窗口操作系统上的 Gitbash 终端终端可读取系统路径/用户路径/用户路径并运行应用程序,但在跟踪时可能会丢失
- App is added to environment variables without closing terminal
- MSYS / MinGW is converting your path
- App command your trying to use common alias name instead of original way of calling
<强 > 使用案例 - 1 : 强 >
重新启动终端站点应该工作并使用低于命令的终端点来校验您的路径
envgrep PATH
<强 > 使用案例 - 2 : 强 >
让我以 docker
为例解释 docker
将无法直接在 gitbash 终端上工作, 因为这样的应用程序 MSYSS 正在转换其源路路。 对于这些问题, 您可能需要用命令 MSYS_ NO_ PATHCONV=1
告诉您的终端忽略路径转换, 并继续实际执行命令, 例如 docker -- help
应该像下面
MSYS_NO_PATHCONV=1 MSYS_NO_PATHCONV=1 docker run -dp 3000:3000 -w /app -v "$(pwd):/app" node:12-alpine sh -c "yarn install && yarn run dev"
717d12b9fe5211f0189ccbed0ba056ca242647812627682d0149ede29af472a4
Use Case - 3 :
let me explain with an example az
cli, ideally az cli install in windows as az.cmd
which is added to system/user path. on windows operating system either powershell or command prompt recognize az.cmd
as az
but git bash won t understand it - so you have use alias to avoid the confusion say alias az= az.cmd
and then execute az --help
will work for you