@lark-apaas/openclaw-scripts-diagnose-cli 0.1.1-alpha.5 → 0.1.1-alpha.6

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/dist/index.cjs +6 -3
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1202,9 +1202,12 @@ function runReset(input, taskId, resultFile) {
1202
1202
  updateProgress(resultFile, currentStep, STEPS[4], startedAt);
1203
1203
  const JSON5 = loadJSON5();
1204
1204
  const version = JSON5.parse(node_fs.default.readFileSync(srcConfigPath, "utf-8")).meta?.lastTouchedVersion;
1205
- if (version) shell(`npm i -g openclaw@${version}`, 3e5);
1206
- else shell("npm i -g openclaw@latest", 3e5);
1207
- shell("openclaw doctor --fix", 6e4);
1205
+ try {
1206
+ shell("npm uninstall -g openclaw 2>/dev/null || true", 3e4);
1207
+ } catch {}
1208
+ if (version) shell(`npm i -g openclaw@${version}`, 6e5);
1209
+ else shell("npm i -g openclaw@latest", 6e5);
1210
+ shell("openclaw doctor --fix", 12e4);
1208
1211
  currentStep = 6;
1209
1212
  updateProgress(resultFile, currentStep, STEPS[5], startedAt);
1210
1213
  if (fileExists(CORE_BACKUP_PATH)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/openclaw-scripts-diagnose-cli",
3
- "version": "0.1.1-alpha.5",
3
+ "version": "0.1.1-alpha.6",
4
4
  "description": "CLI for OpenClaw config diagnose and repair with JSON5 support",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {