Install: cache completion scripts on install/update

This commit is contained in:
Shakker
2026-02-03 08:37:31 +00:00
parent 80d8fe7786
commit 9950440cf6
2 changed files with 28 additions and 2 deletions

View File

@@ -293,13 +293,13 @@ function trySetupCompletion(repoRoot) {
try {
// Run with OPENCLAW_SKIP_POSTINSTALL to avoid any weird recursion,
// though distinct from this script.
spawnSync(process.execPath, [binPath, "completion", "--install", "--yes"], {
spawnSync(process.execPath, [binPath, "completion", "--install", "--yes", "--write-state"], {
cwd: repoRoot,
stdio: "inherit",
env: { ...process.env, OPENCLAW_SKIP_POSTINSTALL: "1" },
});
} catch {
// Ignore errors to not break install
// Ignore errors
}
}