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 1d74209 commit 84bf1ccCopy full SHA for 84bf1cc
1 file changed
index.js
@@ -44,6 +44,11 @@ const getDefaultNpmPrefix = () => {
44
return APPDATA ? path.join(APPDATA, 'npm') : path.dirname(process.execPath);
45
}
46
47
+ // Homebrew: `/opt/homebrew/Cellar/node/21.0.0/bin/node` → `/opt/homebrew`
48
+ if (process.execPath.includes('/Cellar/node')) {
49
+ return process.execPath.slice(0, process.execPath.indexOf('/Cellar/node'));
50
+ }
51
+
52
// `/usr/local/bin/node` → `prefix=/usr/local`
53
return path.dirname(path.dirname(process.execPath));
54
};
0 commit comments