错误运行git subpodule命令在Windows上的Git-Bass外
我正在研究一个带有git子模块的项目,有时需要运行命令,例如git subpodule init
和git subpodule Update
。我是Windows 2.35.2的Runnig Git。
问题在于,这些非常具体的命令在除了git-bash以外没有任何环境(其他命令效果很好)。当我在Windows CMD上运行它们时,甚至在VSCODE内部的Git-Bass终端运行时,我会遇到错误。
$ git submodule update
Stack trace:
Frame Function Args
000FFFF9FB0 00180062CB7 (000FFFFA1B8, 00000000002, 00000000002, 000FFFFDE50)
...
000FFFFFFF0 001800477C4 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
/mingw64/libexec/git-core/git-sh-setup: line 46: /git-sh-i18n: No such file or directory
我尝试了一些明显的解决方案,例如在管理模式下添加GIT路径或运行CMD或VSCODE,但无效。 The thing is that the line of the script, mentioned on the error, should get the path of git-sh-i18n
:
. "$(git --exec-path)/git-sh-i18n"
And when I run this line on CMD itself returns the right path:
git --exec-path
C:/Program Files/Git/mingw64/libexec/git-core
So, it应该在git-setup
脚本中工作,但不行。
有人有同样的问题并有提示吗?
I'm working on a project with git submodules and sometimes need to run commands like git submodule init
and git submodule update
. I'm runnig Git for Windows 2.35.2.
The problem is that these very specific commands don't work on any environment except git-bash (other commands work well). When I run them on Windows CMD or even git-bash terminal inside VsCode i'm getting the error bellow.
$ git submodule update
Stack trace:
Frame Function Args
000FFFF9FB0 00180062CB7 (000FFFFA1B8, 00000000002, 00000000002, 000FFFFDE50)
...
000FFFFFFF0 001800477C4 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
/mingw64/libexec/git-core/git-sh-setup: line 46: /git-sh-i18n: No such file or directory
I've tried some obvious solutions like adding git paths or running CMD or VsCode on administration mode but nothing works.
The thing is that the line of the script, mentioned on the error, should get the path of git-sh-i18n
:
. "$(git --exec-path)/git-sh-i18n"
And when I run this line on CMD itself returns the right path:
git --exec-path
C:/Program Files/Git/mingw64/libexec/git-core
So, it should work, in the git-sh-setup
script, but doesn't.
Has anyone had the same problem and have any tip?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然,在
Apparently on newer versions of Git for Windows this problem doesn't happen anymore.