mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 20:46:57 +02:00
perf: avoid slow Docker live lane cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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<boolean> {
|
||||
const root = await resolveOpenClawPackageRoot({
|
||||
@@ -32,6 +34,7 @@ async function generateCompletionCache(): Promise<boolean> {
|
||||
cwd: root,
|
||||
env: process.env,
|
||||
encoding: "utf-8",
|
||||
timeout: COMPLETION_CACHE_WRITE_TIMEOUT_MS,
|
||||
});
|
||||
|
||||
return result.status === 0;
|
||||
|
||||
Reference in New Issue
Block a user