fix(openclaw): validate CLI binary exists before spawn to prevent ENOENT crash#1837
Merged
fix(openclaw): validate CLI binary exists before spawn to prevent ENOENT crash#1837
Conversation
…ENT crash resolveCommandPath now returns null when the binary is not found instead of falling back to the bare command name. doStart rejects early with a descriptive error, preventing the unhandled spawn ENOENT that surfaced as a fatal crash in Sentry (ELECTRON-DZ, 4 occurrences on v1.9.1). Fixes ELECTRON-DZ
Contributor
Code Review:fix(openclaw): validate CLI binary exists before spawn to prevent ENOENT crash (#1837)变更概述本 PR 修改了 方案评估结论:✅ 方案合理 方案直接解决了 Sentry ELECTRON-DZ 报告的 ENOENT 崩溃问题,在 spawn 调用前进行预检是正确的防御策略。返回类型从 问题清单✅ 未发现明显问题,代码质量良好。 各维度检查结果:
汇总无问题。 结论
本报告由本地 CONCLUSION: APPROVED |
Contributor
|
✅ 已自动 review,无阻塞性问题,正在触发自动合并。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolveCommandPath()now returnsnullinstead of the bare command name when the CLI binary is not found on PATHdoStart()rejects early with a descriptive error before callingspawn(), preventing the fatal ENOENT crashSentry: ELECTRON-DZ — 4 occurrences, fatal level, v1.9.1
Closes #1836
Test plan
spawnnot calledbun run lint:fix— 0 errorsbunx tsc --noEmit— 0 errorspreviewFileWatch.dom.test.tsare unrelated