troxy-cli 1.0.4 → 1.0.5

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/package.json +1 -1
  2. package/src/init.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "AI payment control — protect your agent's payments with policies",
5
5
  "type": "module",
6
6
  "bin": {
package/src/init.js CHANGED
@@ -126,7 +126,12 @@ export async function runInit({ key } = {}) {
126
126
 
127
127
  function installService(apiKey, agentName) {
128
128
  const platform = process.platform;
129
- const troxy = process.execPath.replace(/node$/, 'troxy') ;
129
+ let troxy;
130
+ try {
131
+ troxy = execSync('which troxy').toString().trim();
132
+ } catch {
133
+ troxy = '/usr/local/bin/troxy';
134
+ }
130
135
 
131
136
  if (platform === 'linux') {
132
137
  const unit = `[Unit]