windows 上用 claude code,使用是 git bash 报错

7 月 21 日
 ywcjxf1515
你们在 windows 上用 claude code ,使用的是 git bash
会不会经常报 Error: Exit code 5
0 [main] bash (6336) C:\Program Files\Git\bin\..\usr\bin\bash.exe: *** fatal error - add_item
("\??\C:\Program Files\Git", "/", ...) failed, errno 1


已经把 hook 都改走 powershell
还是会有 我怀疑是 statusline 不断调用 git bash 的问题
1999 次点击
所在节点    程序员
10 条回复
YanSeven
7 月 21 日
让 claude code 自己原地诊断
ywcjxf1515
7 月 21 日
试了 其中一个版本说是起太多 git bash 进程的问题
leihaibo1992
7 月 21 日
windows 上还是 powershell7 比较稳,或者上 wsl ,Git Bash 非常垃圾
leihaibo1992
7 月 21 日
这些大厂的 agent 产品都优先考虑 mac 用户,windows 体验做到很烂,请体验一下我做的 octo-agent ( https://v2ex.com/t/1228101 ),所有操作系统都是第一公民,windows 小白用户都能立刻上手
yidinghe
7 月 21 日
一定要用 bash 的话,就在 WSL 里面用吧
zuosiruan
7 月 21 日
上面说的对,上 powershell7 ,巨稳定
ywcjxf1515
7 月 21 日
@zuosiruan claude code 不会一堆重试 为了跑对 powershell 命令
WashFreshFresh
7 月 21 日
换个思路 我是在 git bash 里切到项目路径 然后气动的 claude 目前命令使用的都正常
ywcjxf1515
7 月 21 日
@WashFreshFresh 原理是?
ywcjxf1515
7 月 21 日
我现在是 agent 写了一个 c# exe ,里面是进程锁,相当于让 git bash 串行了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1228768

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX