galaxy-opc 0.5.21 → 0.5.22

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/cli.mjs +4 -1
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -176,7 +176,7 @@ async function installOpenclawWithFallback() {
176
176
  {
177
177
  label: "官方源",
178
178
  args: ["install", "-g", "openclaw@latest"],
179
- timeout: 60_000, // 60s 超时,超时自动切镜像
179
+ timeout: 120_000, // 120s 超时
180
180
  },
181
181
  {
182
182
  label: "国内镜像(npmmirror)",
@@ -187,6 +187,9 @@ async function installOpenclawWithFallback() {
187
187
 
188
188
  let lastErr = null;
189
189
  for (const attempt of attempts) {
190
+ // 清理上次失败/中断留下的残留目录,防止 ENOTEMPTY 报错
191
+ try { execSync("npm uninstall -g openclaw", { stdio: "ignore" }); } catch { /* ignore */ }
192
+
190
193
  console.log(dim(` 尝试 ${attempt.label} 安装 OpenClaw...(超时 ${attempt.timeout / 1000}s 自动切换)\n`));
191
194
  try {
192
195
  await runCommand("npm", attempt.args, { env, timeout: attempt.timeout });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "galaxy-opc",
3
- "version": "0.5.21",
3
+ "version": "0.5.22",
4
4
  "description": "星环 Galaxy OPC — 一人公司孵化与赋能平台 AI 员工系统",
5
5
  "keywords": [
6
6
  "ai",