Skip to content

The agent that grows with you

fix(install): the bad -Channel refusal carries a failure class

Teknium363504a0badb
diff --git a/scripts/install.ps1 b/scripts/install.ps1
index 90ce5d1f719..7dd618db7bd 100644
--- a/scripts/install.ps1
+++ b/scripts/install.ps1
@@ -953,7 +953,7 @@ function Stage-Repository {
# parameter through this scope.
$chosen = ''
$release = ''
- if ($Channel -and $Channel -cnotin @('stable', 'main')) { Fail "-Channel must be stable or main, not $Channel" }
+ if ($Channel -and $Channel -cnotin @('stable', 'main')) { Fail "-Channel must be stable or main, not $Channel" other }
# Refuse an occupied non-checkout before provisioning Git. This check
# needs no tool download and must not overwrite a user's existing files.
if (-not (Test-Path (Join-Path $InstallDir ".git")) -and (Test-Path -LiteralPath $InstallDir)) {