Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ param(
[switch]$Help
)

# Fail fast, per rules/powershell/powershell-strict-mode.md. StrictMode turns a
# misspelled variable and a non-existent property into terminating errors instead
# of a silent $null; ErrorActionPreference makes a cmdlet failure stop the script
# rather than letting the next line run on the failure's aftermath. Both matter
# here: this script resolves destination paths from variables and then removes
# and copies directories under them.
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

function Write-Err($msg) { [Console]::Error.WriteLine($msg) }
Expand Down