Pause scripts on errors
This commit is contained in:
parent
ba5c46a884
commit
19900bac81
4 changed files with 6 additions and 3 deletions
|
@ -7,7 +7,8 @@
|
|||
|
||||
function Invoke-WindowsInstallation([Context] $context)
|
||||
{
|
||||
$ErrorActionPreference = "Inquire";
|
||||
$Global:InformationPreference = "Continue";
|
||||
$Global:ErrorActionPreference = "Inquire";
|
||||
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
|
||||
$context.UserNames ??= @("Manuel");
|
||||
Start-WindowsInstallation $context;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
function Backup-WindowsInstallation([Context] $context) {
|
||||
Write-Information "Backing up Windows";
|
||||
$Global:InformationPreference = "Continue";
|
||||
$Global:ErrorActionPreference = "Inquire";
|
||||
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1";
|
||||
$backupRoot = $context.BackupRoot();
|
||||
Backup-PersonalFiles $context;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/pwsh
|
||||
$Global:InformationPreference = "Continue";
|
||||
$Global:ErrorActionPreference = "Inquire";
|
||||
$null = $env:WIN_COMPUTER_NAME;
|
||||
$null = $env:SETUP_SCRIPT_NAME;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/pwsh
|
||||
. "$PSScriptRoot/Context.ps1";
|
||||
$Global:InformationPreference = "Continue";
|
||||
$Global:ErrorActionPreference = "Inquire";
|
||||
|
||||
[Context]::new().PreventSleepMode();
|
||||
$null = powershell -c Get-PackageProvider -ListAvailable NuGet;
|
||||
|
|
Loading…
Reference in a new issue