Skip to content

Commit 4a3030d

Browse files
committed
fix: avoid PowerShell error variable collision
1 parent 30aa1b5 commit 4a3030d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ErrorActionPreference = "Stop"
1818
$ACCENT = "`e[38;2;255;77;77m" # coral-bright
1919
$SUCCESS = "`e[38;2;0;229;204m" # cyan-bright
2020
$WARN = "`e[38;2;255;176;32m" # amber
21-
$ERROR = "`e[38;2;230;57;70m" # coral-mid
21+
$ERROR_COLOR = "`e[38;2;230;57;70m" # coral-mid
2222
$MUTED = "`e[38;2;90;100;128m" # text-muted
2323
$NC = "`e[0m" # No Color
2424

@@ -27,7 +27,7 @@ function Write-Host {
2727
$msg = switch ($Level) {
2828
"success" { "$SUCCESS$NC $Message" }
2929
"warn" { "$WARN!$NC $Message" }
30-
"error" { "$ERROR$NC $Message" }
30+
"error" { "$ERROR_COLOR$NC $Message" }
3131
default { "$MUTED·$NC $Message" }
3232
}
3333
Microsoft.PowerShell.Utility\Write-Host $msg

0 commit comments

Comments
 (0)