mirror of
https://github.com/herdrdev/herdr.git
synced 2026-09-22 00:01:06 +00:00
fix(update): tolerate empty windows channel env
This commit is contained in:
+5
-1
@@ -1,6 +1,5 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet("stable", "preview")]
|
||||
[string]$Channel = $env:HERDR_CHANNEL,
|
||||
[string]$ManifestUrl = $env:HERDR_MANIFEST_URL,
|
||||
[string]$InstallDir = $env:HERDR_INSTALL_DIR,
|
||||
@@ -15,6 +14,11 @@ if ([string]::IsNullOrWhiteSpace($Channel)) {
|
||||
$Channel = "preview"
|
||||
}
|
||||
|
||||
if ($Channel -notin @("stable", "preview")) {
|
||||
Write-Error "Invalid Herdr channel '$Channel'. Use 'preview'."
|
||||
exit 1
|
||||
}
|
||||
|
||||
function Write-Step {
|
||||
param([string]$Message)
|
||||
Write-Host "==> $Message"
|
||||
|
||||
Reference in New Issue
Block a user