Pause before reboot when debugging
This commit is contained in:
parent
8c376a029e
commit
3bf64ff7e5
|
@ -77,6 +77,7 @@ $null = New-Module {
|
|||
}
|
||||
|
||||
$Global:InOperation = $true;
|
||||
$Global:NonInteractive = $NonInteractive;
|
||||
$Global:ErrorActionPreference = $NonInteractive.IsPresent ? 'Continue' : 'Inquire';
|
||||
|
||||
if ($IsWindows) {
|
||||
|
|
|
@ -185,6 +185,10 @@ $null = New-Module {
|
|||
}
|
||||
}
|
||||
|
||||
if ($env:DEBUG -and (-not $Global:NonInteractive)) {
|
||||
Read-Host "Press enter to reboot";
|
||||
}
|
||||
|
||||
Restart-Computer -Force;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue