Add support for the sudo command

This commit is contained in:
Manuel Thalmann 2024-08-09 02:22:45 +02:00
parent c68ce2b4e3
commit f38794c3c0
2 changed files with 7 additions and 0 deletions

View file

@ -10,5 +10,6 @@ function Start-Operation {
$env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
}
New-Alias "sudo" gsudo;
& $Action;
}

View file

@ -47,6 +47,12 @@ $null = New-Module {
continue;
}
if (-not (Test-Command "gsudo")) {
Install-ChocoPackage gsudo;
refreshenv;
continue;
}
if (-not (Test-Command "git")) {
Install-ChocoPackage git;
refreshenv;