File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,15 @@ jobs:
148148 - name : Ensure Git bash is on PATH (Windows)
149149 if : startsWith(matrix.os, 'windows')
150150 run : |
151- $gitCmd = Get-Command git -ErrorAction SilentlyContinue
152- if ($gitCmd) {
153- $bashDir = Join-Path (Split-Path (Split-Path $gitCmd.Source)) 'bin'
154- if (Test-Path $bashDir) {
155- echo "$bashDir" >> $env:GITHUB_PATH
156- }
151+ # Git for Windows is always installed on GitHub-hosted runners.
152+ # Add its bin dir so taiki-e/install-action can find bash.exe.
153+ # See https://github.com/actions/partner-runner-images/issues/169
154+ $gitBin = 'C:\Program Files\Git\bin'
155+ if (Test-Path (Join-Path $gitBin 'bash.exe')) {
156+ echo $gitBin >> $env:GITHUB_PATH
157+ Write-Output "Added $gitBin to PATH"
158+ } else {
159+ Write-Warning "bash.exe not found at $gitBin"
157160 }
158161 shell : pwsh
159162
Original file line number Diff line number Diff line change @@ -177,12 +177,15 @@ jobs:
177177 - name : Ensure Git bash is on PATH (Windows)
178178 if : startsWith(matrix.os, 'windows')
179179 run : |
180- $gitCmd = Get-Command git -ErrorAction SilentlyContinue
181- if ($gitCmd) {
182- $bashDir = Join-Path (Split-Path (Split-Path $gitCmd.Source)) 'bin'
183- if (Test-Path $bashDir) {
184- echo "$bashDir" >> $env:GITHUB_PATH
185- }
180+ # Git for Windows is always installed on GitHub-hosted runners.
181+ # Add its bin dir so taiki-e/install-action can find bash.exe.
182+ # See https://github.com/actions/partner-runner-images/issues/169
183+ $gitBin = 'C:\Program Files\Git\bin'
184+ if (Test-Path (Join-Path $gitBin 'bash.exe')) {
185+ echo $gitBin >> $env:GITHUB_PATH
186+ Write-Output "Added $gitBin to PATH"
187+ } else {
188+ Write-Warning "bash.exe not found at $gitBin"
186189 }
187190 shell : pwsh
188191
You can’t perform that action at this time.
0 commit comments