去掉 C:/Program Files/Git 在GitBash执行 .sh 脚本

2024-06-07 11:33:21 浏览数 (2)

When you run a .sh script in the Git Bash, there is an annoying thing is that the 'C:/Program Files/Git' will be added in front of the leading slash /

java.io.FileNotFoundException: C:Program FilesGitkafka_2.13-3.7.0ssl_certs_bakca-cert (The system cannot find the path specified)

Found the solution, run the following in the Git Bash

代码语言:javascript复制
export MSYS_NO_PATHCONV=1

References:

https://stackoverflow.com/questions/39632924/git-bash-is-adding-its-current-path-to-one-of-the-parameter

https://stackoverflow.com/questions/7250130/how-to-stop-mingw-and-msys-from-mangling-path-names-given-at-the-command-line/34386471#34386471

0 人点赞