mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-13 13:26:48 +00:00
* add windows2022 image template Co-authored-by: Aleksandr Chebotov <v-aleche@microsoft.com> Co-authored-by: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Co-authored-by: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>
24 lines
843 B
PowerShell
24 lines
843 B
PowerShell
# 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
|
|
|
|
# WSL is available on Windows Server 2019 and Windows Server 2022
|
|
if (-not (Test-IsWin16))
|
|
{
|
|
# wslbash <--> C:\Windows\System32\bash.exe
|
|
New-Item -ItemType SymbolicLink -Path "$shellPath\wslbash.exe" -Target "$env:SystemRoot\System32\bash.exe" | Out-Null
|
|
}
|