diff --git a/scripts/test-live-acp-bind-docker.sh b/scripts/test-live-acp-bind-docker.sh index a013360e927..1152ca816b5 100644 --- a/scripts/test-live-acp-bind-docker.sh +++ b/scripts/test-live-acp-bind-docker.sh @@ -161,10 +161,6 @@ WRAP ;; esac tmp_dir="$(mktemp -d)" -cleanup() { - rm -rf "$tmp_dir" -} -trap cleanup EXIT source /src/scripts/lib/live-docker-stage.sh openclaw_live_stage_source_tree "$tmp_dir" # Use a writable node_modules overlay in the temp repo. Vite writes bundled diff --git a/scripts/test-live-cli-backend-docker.sh b/scripts/test-live-cli-backend-docker.sh index 9419b8e0289..030befcfc3d 100644 --- a/scripts/test-live-cli-backend-docker.sh +++ b/scripts/test-live-cli-backend-docker.sh @@ -366,10 +366,6 @@ WRAP fi fi tmp_dir="$(mktemp -d)" -cleanup() { - rm -rf "$tmp_dir" -} -trap cleanup EXIT source /src/scripts/lib/live-docker-stage.sh openclaw_live_stage_source_tree "$tmp_dir" # Use a writable node_modules overlay in the temp repo. Vite writes bundled diff --git a/scripts/test-live-codex-harness-docker.sh b/scripts/test-live-codex-harness-docker.sh index e78dd202ede..1da4f4c85c9 100644 --- a/scripts/test-live-codex-harness-docker.sh +++ b/scripts/test-live-codex-harness-docker.sh @@ -167,10 +167,6 @@ if [ "${OPENCLAW_LIVE_CODEX_HARNESS_AUTH:-codex-auth}" = "api-key" ]; then printf '%s\n' "$OPENAI_API_KEY" | "$NPM_CONFIG_PREFIX/bin/codex" login --with-api-key >/dev/null fi tmp_dir="$(mktemp -d)" -cleanup() { - rm -rf "$tmp_dir" -} -trap cleanup EXIT source /src/scripts/lib/live-docker-stage.sh openclaw_live_stage_source_tree "$tmp_dir" mkdir -p "$tmp_dir/node_modules" diff --git a/scripts/test-live-gateway-models-docker.sh b/scripts/test-live-gateway-models-docker.sh index 8bfc38a66ca..777f5209b7b 100755 --- a/scripts/test-live-gateway-models-docker.sh +++ b/scripts/test-live-gateway-models-docker.sh @@ -137,10 +137,6 @@ if [ "${OPENCLAW_DOCKER_AUTH_PRESTAGED:-0}" != "1" ]; then fi fi tmp_dir="$(mktemp -d)" -cleanup() { - rm -rf "$tmp_dir" -} -trap cleanup EXIT source /src/scripts/lib/live-docker-stage.sh openclaw_live_stage_source_tree "$tmp_dir" mkdir -p "$tmp_dir/node_modules" diff --git a/scripts/test-live-models-docker.sh b/scripts/test-live-models-docker.sh index 3d6d769d79d..7808cb13c3b 100755 --- a/scripts/test-live-models-docker.sh +++ b/scripts/test-live-models-docker.sh @@ -167,10 +167,6 @@ if [ "${OPENCLAW_DOCKER_AUTH_PRESTAGED:-0}" != "1" ]; then fi fi tmp_dir="$(mktemp -d)" -cleanup() { - rm -rf "$tmp_dir" -} -trap cleanup EXIT source /src/scripts/lib/live-docker-stage.sh openclaw_live_stage_source_tree "$tmp_dir" mkdir -p "$tmp_dir/node_modules" diff --git a/src/commands/doctor-completion.ts b/src/commands/doctor-completion.ts index 169cca49d2d..9d48f253cd0 100644 --- a/src/commands/doctor-completion.ts +++ b/src/commands/doctor-completion.ts @@ -16,6 +16,8 @@ import type { DoctorPrompter } from "./doctor-prompter.js"; type CompletionShell = "zsh" | "bash" | "fish" | "powershell"; +const COMPLETION_CACHE_WRITE_TIMEOUT_MS = 30_000; + /** Generate the completion cache by spawning the CLI. */ async function generateCompletionCache(): Promise { const root = await resolveOpenClawPackageRoot({ @@ -32,6 +34,7 @@ async function generateCompletionCache(): Promise { cwd: root, env: process.env, encoding: "utf-8", + timeout: COMPLETION_CACHE_WRITE_TIMEOUT_MS, }); return result.status === 0;