mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
refactor: keep noninteractive install configuration environment-only
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user