We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d83d23 commit 74cda2eCopy full SHA for 74cda2e
lib/utils.js
@@ -27,17 +27,13 @@ const findPackageFileInPath = input => {
27
28
const stat = fs.statSync(input);
29
30
- if (stat) {
+ if (stat.isFile()) {
31
32
- if (stat.isFile()) {
+ return path.resolve(path.join(path.dirname(input), '/package.json'));
33
34
- return path.resolve(path.join(path.dirname(input), '/package.json'));
+ } else if (stat.isDirectory()) {
35
36
- } else if (stat.isDirectory()) {
37
-
38
- return path.resolve(path.join(input, '/package.json'));
39
40
- }
+ return path.resolve(path.join(input, '/package.json'));
41
42
}
43
0 commit comments