Skip to content

Commit fd3e492

Browse files
aocaiclaude
authored andcommitted
fix: 工作目录不存在时 spawn 误报 ENOENT 的根因修复
- 在 streamClaude() 中,将 workingDirectory 传给 SDK 前先用 fs.existsSync 验证,不存在则静默回退到 os.homedir() - 补充 console.warn 方便调试追踪(原因:Node.js spawn 当 cwd 不存在时会以二进制路径为主语抛出 ENOENT,错误信息极具误导性) - 优化 ENOENT 错误提示文案,明确告知也可能是工作目录问题 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5881601 commit fd3e492

1 file changed

Lines changed: 493 additions & 269 deletions

File tree

0 commit comments

Comments
 (0)