ci(devops): Windows runner 将 shell 钉到 Git for Windows 自带 bash 绝对路径
Build Windows Only / build-windows (push) Failing after 15s
Build Windows Only / build-windows (push) Failing after 15s
Git 安装包默认只把 git.exe 加入 PATH(Git\cmd),不含 bash.exe(Git\bin),
导致 act_runner 解析 `shell: bash` 时报「Cannot find: bash in PATH」。
改用 GitHub Actions 官方等价写法,绕过 PATH 查找:
C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}
(bin\bash.exe 包装器会注入 /usr/bin,使脚本内 sh/powershell 可解析)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -28,11 +28,11 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Provision (idempotent — auto-runs if host not initialized)
|
||||
shell: bash
|
||||
shell: 'C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}'
|
||||
run: sh scripts/ci/provision-windows.sh
|
||||
|
||||
- name: Compile (Flutter Windows)
|
||||
shell: bash
|
||||
shell: 'C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}'
|
||||
run: sh scripts/ci/compile-windows.sh "${{ inputs.ver || 'v1.0.4' }}"
|
||||
|
||||
- name: Upload windows artifact
|
||||
|
||||
@@ -122,11 +122,11 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Provision (idempotent — auto-runs if host not initialized)
|
||||
shell: bash
|
||||
shell: 'C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}'
|
||||
run: sh scripts/ci/provision-windows.sh
|
||||
|
||||
- name: Compile (Flutter Windows)
|
||||
shell: bash
|
||||
shell: 'C:\Program Files\Git\bin\bash.exe --noprofile --norc -eo pipefail {0}'
|
||||
run: sh scripts/ci/compile-windows.sh "${{ gitea.ref_name }}"
|
||||
|
||||
- name: Upload windows artifacts
|
||||
|
||||
Reference in New Issue
Block a user