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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-notify",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Agent notification tool with Feishu integration",
5
5
  "bin": {
6
6
  "agent-notify": "./bin/agent-notify.js"
@@ -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