PortValhalla/scripts/Common/Scripts/Operations.ps1

14 lines
276 B
PowerShell

function Start-Operation {
param(
[scriptblock] $Action
)
$Global:ErrorActionPreference = 'Inquire';
$env:WSLENV = "CONFIG_MODULE/p";
if ($env:CONFIG_MODULE) {
$env:CONFIG_MODULE = Resolve-Path $env:CONFIG_MODULE;
}
& $Action;
}