fixed tokens
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(ValueFromRemainingArguments = $true)]
|
||||
[string[]]$Command
|
||||
)
|
||||
|
||||
$msysRoot = if ($env:MSYS2_ROOT) { $env:MSYS2_ROOT } else { "C:\msys64" }
|
||||
$bash = Join-Path $msysRoot "usr\bin\bash.exe"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $bash)) {
|
||||
Write-Error "MSYS2 bash was not found at: $bash"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$env:MSYSTEM = "UCRT64"
|
||||
$env:CHERE_INVOKING = "1"
|
||||
|
||||
if ($Command.Count -eq 0) {
|
||||
& $bash --login
|
||||
} else {
|
||||
$cmdString = $Command -join " "
|
||||
& $bash -lc $cmdString
|
||||
}
|
||||
|
||||
exit $LASTEXITCODE
|
||||
Reference in New Issue
Block a user