agent-notify 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/install.js +5 -0
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -15,6 +15,11 @@ function getBinaryDir() {
|
|
|
15
15
|
// npm bin -g is deprecated, use npm prefix -g instead
|
|
16
16
|
try {
|
|
17
17
|
const prefix = execSync('npm prefix -g', { encoding: 'utf8' }).trim();
|
|
18
|
+
// On Windows, npm prefix -g returns the bin directory directly
|
|
19
|
+
// On Unix, it returns the parent and bin is in {prefix}/bin
|
|
20
|
+
if (os.platform() === 'win32') {
|
|
21
|
+
return prefix;
|
|
22
|
+
}
|
|
18
23
|
return path.join(prefix, 'bin');
|
|
19
24
|
} catch (e) {
|
|
20
25
|
// Fallback to ~/.local/bin
|