Ensure to run bash scripts using bash

This commit is contained in:
Manuel Thalmann 2024-04-01 17:02:49 +02:00
parent 6128c78eba
commit 855715059e

View file

@ -5,10 +5,12 @@ function Start-BashScript() {
)
Write-Information "Preparing setup script";
$bashLocation = Join-Path (Split-Path -Parent (Split-Path -Parent (Get-Command git-gui).Source)) "git-bash";
$script = New-TemporaryFile;
$script = Rename-Item $script -NewName "$script.sh" -PassThru;
Set-Content $script ([string]::Join("`n", $Content));
Write-Information "Running prepared script";
Start-Process -Wait $script;
Start-Process -Wait "$bashLocation" -ArgumentList @("$script");
Remove-Item $script;
}