错误运行git subpodule命令在Windows上的Git-Bass外

发布于 2025-01-22 14:01:45 字数 1173 浏览 1 评论 0原文

我正在研究一个带有git子模块的项目,有时需要运行命令,例如git subpodule initgit 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间不值得 2025-01-29 14:01:45

显然,在

Apparently on newer versions of Git for Windows this problem doesn't happen anymore.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文