PortValhalla/scripts/Common/Scripts/Operations.ps1

16 lines
304 B
PowerShell
Raw Normal View History

function Start-Operation {
param(
[scriptblock] $Action
)
2024-08-08 12:08:38 +00:00
$Global:ErrorActionPreference = 'Inquire';
$env:WSLENV = "CONFIG_MODULE/p";
if ($env:CONFIG_MODULE) {
$env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
}
2024-08-09 00:22:45 +00:00
New-Alias "sudo" gsudo;
& $Action;
}