Prevent initialization of nested operations
This commit is contained in:
parent
c2d494f151
commit
8fb126a091
1 changed files with 13 additions and 9 deletions
|
@ -23,6 +23,8 @@ $null = New-Module {
|
||||||
[scriptblock] $Action
|
[scriptblock] $Action
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (-not $Global:InOperation) {
|
||||||
|
$Global:InOperation = $true;
|
||||||
$Global:ErrorActionPreference = 'Inquire';
|
$Global:ErrorActionPreference = 'Inquire';
|
||||||
$env:WSLENV = "CONFIG_MODULE/p";
|
$env:WSLENV = "CONFIG_MODULE/p";
|
||||||
|
|
||||||
|
@ -35,6 +37,8 @@ $null = New-Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Alias -Force "sudo" gsudo;
|
New-Alias -Force "sudo" gsudo;
|
||||||
|
}
|
||||||
|
|
||||||
& $Action;
|
& $Action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue