troxy-cli 1.4.14 → 1.4.15

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.
Files changed (2) hide show
  1. package/bin/troxy.js +4 -2
  2. package/package.json +1 -1
package/bin/troxy.js CHANGED
@@ -355,8 +355,10 @@ switch (command) {
355
355
  } catch (err) {
356
356
  const stderr = err.stderr?.toString() || '';
357
357
  if (stderr.includes('ENOTEMPTY')) {
358
- // npm bug on macOS: global package dir not empty during rename — uninstall first
359
- execSync('npm uninstall -g troxy-cli && npm install -g troxy-cli@latest', { stdio: 'pipe', shell: true });
358
+ // npm bug on macOS/Homebrew: rename fails because dir has contents.
359
+ // rm -rf the stale dir directly, then reinstall cleanly.
360
+ const globalRoot = execSync('npm root -g', { stdio: 'pipe' }).toString().trim();
361
+ execSync(`rm -rf "${globalRoot}/troxy-cli" && npm install -g troxy-cli@latest`, { stdio: 'pipe', shell: true });
360
362
  } else {
361
363
  throw err;
362
364
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.4.14",
3
+ "version": "1.4.15",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {