Skip to content

Commit a51c717

Browse files
committed
log npm found
1 parent 2f9542d commit a51c717

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: index.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ const getPrefix = () => {
6666

6767
function tryNpmPath() {
6868
try {
69-
if (process.platform === 'win32') {
70-
return fs.realpathSync(require('which').sync('npm.exe'));
71-
} else {
72-
return fs.realpathSync(require('which').sync('npm'));
73-
}
69+
const npm = require('which').sync('npm');
70+
console.log(npm);
71+
return fs.realpathSync(npm);
7472
} catch (err) { /* do nothing */ }
7573
}
7674

0 commit comments

Comments
 (0)