[Windows] Add shell symlinks (#2395)

* add shell symlinks

* fix paths

* add a wrapper

* fix target output

* fix tests
This commit is contained in:
Aleksandr Chebotov
2021-01-15 13:42:37 +03:00
committed by GitHub
parent da495ea119
commit 68e9c68855
7 changed files with 57 additions and 2 deletions

View File

@@ -304,6 +304,17 @@ function Get-CachedDockerImagesTableData {
}
}
function Get-ShellTarget {
$shells = Get-ChildItem C:\shells -File | Select-Object Name, @{n="Target";e={
if ($_.Name -eq "msys2bash.cmd") {
"C:\msys64\usr\bin\bash.exe"
} else {
@($_.Target)[0]
}
}} | Sort-Object Name
$shells | New-MDTable -Columns ([ordered]@{Name = "left"; Target = "left";})
}
function Get-PacmanVersion {
$msys2BinDir = "C:\msys64\usr\bin"
$pacmanPath = Join-Path $msys2BinDir "pacman.exe"