mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[Windows] Implement new directories hierarchy (#8616)
This commit is contained in:
committed by
GitHub
parent
84a7deae24
commit
d1f2c9a3be
19
images/windows/scripts/build/Configure-Shell.ps1
Normal file
19
images/windows/scripts/build/Configure-Shell.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
# Create shells folder
|
||||
$shellPath = "C:\shells"
|
||||
New-Item -Path $shellPath -ItemType Directory | Out-Null
|
||||
|
||||
# add a wrapper for C:\msys64\usr\bin\bash.exe
|
||||
@'
|
||||
@echo off
|
||||
setlocal
|
||||
IF NOT DEFINED MSYS2_PATH_TYPE set MSYS2_PATH_TYPE=strict
|
||||
IF NOT DEFINED MSYSTEM set MSYSTEM=mingw64
|
||||
set CHERE_INVOKING=1
|
||||
C:\msys64\usr\bin\bash.exe -leo pipefail %*
|
||||
'@ | Out-File -FilePath "$shellPath\msys2bash.cmd" -Encoding ascii
|
||||
|
||||
# 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
|
||||
|
||||
# wslbash <--> C:\Windows\System32\bash.exe
|
||||
New-Item -ItemType SymbolicLink -Path "$shellPath\wslbash.exe" -Target "$env:SystemRoot\System32\bash.exe" | Out-Null
|
||||
Reference in New Issue
Block a user