mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 22:09:26 +00:00
Revert "[Windows] Removed Git internal tools from PATH"
This commit is contained in:
committed by
GitHub
parent
ac4f5699c7
commit
635a57ab88
@@ -1,23 +0,0 @@
|
||||
# Create shells folder
|
||||
$shellPath = "C:\shells"
|
||||
New-Item -Path $shellPath -ItemType Directory | Out-Null
|
||||
|
||||
# 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\sh.exe" -Target "C:\msys64\usr\bin\sh.exe" | Out-Null
|
||||
|
||||
# WSL is available on Windows Server 2019
|
||||
if (Test-IsWin19)
|
||||
{
|
||||
# winbash <--> C:\Windows\System32\bash.exe
|
||||
New-Item -ItemType SymbolicLink -Path "$shellPath\winbash.exe" -Target "$env:SystemRoot\System32\bash.exe" | Out-Null
|
||||
}
|
||||
|
||||
# gitbash <--> C:\Program Files\Git\bin\bash.exe
|
||||
New-Item -ItemType SymbolicLink -Path "$shellPath\gitbash.exe" -Target "$env:ProgramFiles\Git\bin\bash.exe" | Out-Null
|
||||
|
||||
# msysbash <--> C:\msys64\usr\bin\bash.exe
|
||||
New-Item -ItemType SymbolicLink -Path "$shellPath\msysbash.exe" -Target "C:\msys64\usr\bin\bash.exe" | Out-Null
|
||||
|
||||
# Add shells to PATH
|
||||
Add-MachinePathItem $shellPath
|
||||
Reference in New Issue
Block a user