mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 22:09:26 +00:00
[windows] add bash wrapper from git (#1937)
This commit is contained in:
committed by
GitHub
parent
874232fc49
commit
8798c75d67
@@ -3,8 +3,8 @@ $shellPath = "C:\shells"
|
|||||||
New-Item -Path $shellPath -ItemType Directory | Out-Null
|
New-Item -Path $shellPath -ItemType Directory | Out-Null
|
||||||
|
|
||||||
# sh and bash <--> C:\msys64\usr\bin\bash.exe
|
# sh and bash <--> C:\msys64\usr\bin\bash.exe
|
||||||
New-Item -ItemType SymbolicLink -Path "$shellPath\bash.exe" -Target "C:\msys64\usr\bin\bash.exe" | Out-Null
|
New-Item -ItemType SymbolicLink -Path "$shellPath\bash.exe" -Target "C:\msys64\bin\bash.exe" | Out-Null
|
||||||
New-Item -ItemType SymbolicLink -Path "$shellPath\sh.exe" -Target "C:\msys64\usr\bin\sh.exe" | Out-Null
|
New-Item -ItemType SymbolicLink -Path "$shellPath\sh.exe" -Target "C:\msys64\bin\sh.exe" | Out-Null
|
||||||
|
|
||||||
# WSL is available on Windows Server 2019
|
# WSL is available on Windows Server 2019
|
||||||
if (Test-IsWin19)
|
if (Test-IsWin19)
|
||||||
|
|||||||
@@ -95,4 +95,10 @@ if (Test-Path "C:\Program Files\Git\etc\ssh")
|
|||||||
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Copy bash wrapper from git
|
||||||
|
$wrapperPath = "C:\msys64\bin"
|
||||||
|
New-Item -Path $wrapperPath -ItemType Directory -Force | Out-Null
|
||||||
|
Copy-Item -Path "$env:ProgramFiles\Git\bin\bash.exe" -Destination $wrapperPath
|
||||||
|
Copy-Item -Path "$env:ProgramFiles\Git\bin\sh.exe" -Destination $wrapperPath
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "MSYS2"
|
Invoke-PesterTests -TestFile "MSYS2"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Describe "Shell" {
|
Describe "Shell" {
|
||||||
$shellTestCases = @(
|
$shellTestCases = @(
|
||||||
@{Name = "C:\shells\bash.exe"; Target = "C:\msys64\usr\bin\bash.exe"},
|
@{Name = "C:\shells\bash.exe"; Target = "C:\msys64\bin\bash.exe"},
|
||||||
@{Name = "C:\shells\sh.exe"; Target = "C:\msys64\usr\bin\sh.exe"},
|
@{Name = "C:\shells\sh.exe"; Target = "C:\msys64\bin\sh.exe"},
|
||||||
@{Name = "C:\shells\gitbash.exe"; Target = "$env:ProgramFiles\Git\bin\bash.exe"},
|
@{Name = "C:\shells\gitbash.exe"; Target = "$env:ProgramFiles\Git\bin\bash.exe"},
|
||||||
@{Name = "C:\shells\msysbash.exe"; Target = "C:\msys64\usr\bin\bash.exe"}
|
@{Name = "C:\shells\msysbash.exe"; Target = "C:\msys64\usr\bin\bash.exe"}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user