@clawcard/cli 2.0.6 → 2.0.8

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/splash.js +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "The ClawCard CLI — manage your agent keys, billing, and setup from the terminal",
5
5
  "bin": {
6
6
  "clawcard": "./bin/clawcard.mjs"
package/src/splash.js CHANGED
@@ -42,23 +42,26 @@ export async function checkForUpdate() {
42
42
  }
43
43
 
44
44
  export async function performAutoUpdate() {
45
+ if (process.env.CLAWCARD_SKIP_UPDATE) return;
46
+
45
47
  const latest = await checkForUpdate();
46
48
  if (!latest) return;
47
49
 
48
50
  console.log(` Updating to v${latest}...`);
49
51
 
50
52
  try {
51
- execSync("npm cache clean --force 2>/dev/null; npm i -g @clawcard/cli@latest", {
53
+ execSync(`npm cache clean --force 2>/dev/null; npm i -g @clawcard/cli@${latest}`, {
52
54
  stdio: "pipe",
53
55
  timeout: 60000,
54
56
  });
55
57
  console.log(` Updated to v${latest}. Restarting...\n`);
56
58
 
57
- // Re-run the same command with the updated CLI
59
+ // Re-run using the clawcard binary directly (not the cached process)
60
+ const args = process.argv.slice(2); // skip node + script path
58
61
  const { spawnSync } = await import("child_process");
59
- const result = spawnSync(process.argv[0], process.argv.slice(1), {
62
+ const result = spawnSync("clawcard", args, {
60
63
  stdio: "inherit",
61
- env: process.env,
64
+ env: { ...process.env, CLAWCARD_SKIP_UPDATE: "1" },
62
65
  });
63
66
  process.exit(result.status ?? 0);
64
67
  } catch {