Pause scripts on errors
This commit is contained in:
parent
ba5c46a884
commit
19900bac81
4 changed files with 6 additions and 3 deletions
scripts/Windows/OS
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue