refactor: keep noninteractive install configuration environment-only

This commit is contained in:
Edward Frazer
2026-05-26 13:57:19 -07:00
parent 6587c570dd
commit 116fff2926
2 changed files with 4 additions and 9 deletions
+3 -5
View File
@@ -1,6 +1,6 @@
[CmdletBinding()]
param(
[string]$Release = $env:CODEX_RELEASE,
[switch]$NonInteractive
[string]$Release = $env:CODEX_RELEASE
)
Set-StrictMode -Version Latest
@@ -11,9 +11,7 @@ if ([string]::IsNullOrWhiteSpace($Release)) {
$Release = "latest"
}
if (-not $PSBoundParameters.ContainsKey("NonInteractive") -and $env:CODEX_NON_INTERACTIVE -match "^(?i:1|true|yes)$") {
$NonInteractive = $true
}
$NonInteractive = $env:CODEX_NON_INTERACTIVE -match "^(?i:1|true|yes)$"
function Write-Step {
param(
+1 -4
View File
@@ -58,12 +58,9 @@ parse_args() {
RELEASE="$2"
shift
;;
--non-interactive)
NON_INTERACTIVE=true
;;
--help | -h)
cat <<EOF
Usage: install.sh [--release VERSION] [--non-interactive]
Usage: install.sh [--release VERSION]
Environment:
CODEX_RELEASE Version to install; overridden by --release.