fix: stop Gateway without source rebuild#104357
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9443c5df8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| runCommand("pnpm", ["openclaw", "gateway", "stop"], update.checkout); | ||
| // Use the existing built CLI directly. Source launchers may auto-build a | ||
| // stale dist before dispatching `gateway stop`, recreating the live-import race. | ||
| runCommand(process.execPath, ["dist/index.js", "gateway", "stop"], update.checkout); |
There was a problem hiding this comment.
Handle missing dist before direct Gateway stop
When inspectBuildState marks the build as missing, actions.gatewayBuild is true, but this new stop path now executes node dist/index.js gateway stop before pnpm build. In a fresh or corrupted mirror where dist/index.js is absent, Node exits with module-not-found and the updater never reaches the rebuild that is supposed to self-heal missing build output.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
Summary
dist/index.jsProof
pnpm openclaw gateway stopauto-building staledistbefore stopping PID 66870test/scripts/openclaw-live-updater.test.ts(26 passed)