Rename env variable

This commit is contained in:
Andrew Baldwin 2025-10-25 21:26:27 +02:00
parent 865cf5db9a
commit a52383d7f7
2 changed files with 6 additions and 6 deletions

View file

@ -323,7 +323,7 @@ As long as there is an active browser connection, code-server touches
If you want to shutdown code-server if there hasn't been an active connection If you want to shutdown code-server if there hasn't been an active connection
after a predetermined amount of time, you can use the --idle-timeout-seconds flag after a predetermined amount of time, you can use the --idle-timeout-seconds flag
or set an `IDLE_TIMEOUT_SECONDS` environment variable. or set an `CODE_SERVER_IDLE_TIMEOUT_SECONDS` environment variable.
## How do I change the password? ## How do I change the password?

View file

@ -620,14 +620,14 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
args["github-auth"] = process.env.GITHUB_TOKEN args["github-auth"] = process.env.GITHUB_TOKEN
} }
if (process.env.IDLE_TIMEOUT_SECONDS) { if (process.env.CODE_SERVER_IDLE_TIMEOUT_SECONDS) {
if (isNaN(Number(process.env.IDLE_TIMEOUT_SECONDS))) { if (isNaN(Number(process.env.CODE_SERVER_IDLE_TIMEOUT_SECONDS))) {
logger.info("IDLE_TIMEOUT_SECONDS must be a number") logger.info("CODE_SERVER_IDLE_TIMEOUT_SECONDS must be a number")
} }
if (Number(process.env.IDLE_TIMEOUT_SECONDS)) { if (Number(process.env.CODE_SERVER_IDLE_TIMEOUT_SECONDS) <= 60) {
throw new Error("--idle-timeout-seconds must be greater than 60 seconds.") throw new Error("--idle-timeout-seconds must be greater than 60 seconds.")
} }
args["idle-timeout-seconds"] = Number(process.env.IDLE_TIMEOUT_SECONDS) args["idle-timeout-seconds"] = Number(process.env.CODE_SERVER_IDLE_TIMEOUT_SECONDS)
} }
// Ensure they're not readable by child processes. // Ensure they're not readable by child processes.