mirror of
https://github.com/cdr/code-server.git
synced 2025-12-07 08:52:16 +01:00
Rename env variable
This commit is contained in:
parent
865cf5db9a
commit
a52383d7f7
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
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?
|
||||
|
||||
|
|
|
|||
|
|
@ -620,14 +620,14 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
|
|||
args["github-auth"] = process.env.GITHUB_TOKEN
|
||||
}
|
||||
|
||||
if (process.env.IDLE_TIMEOUT_SECONDS) {
|
||||
if (isNaN(Number(process.env.IDLE_TIMEOUT_SECONDS))) {
|
||||
logger.info("IDLE_TIMEOUT_SECONDS must be a number")
|
||||
if (process.env.CODE_SERVER_IDLE_TIMEOUT_SECONDS) {
|
||||
if (isNaN(Number(process.env.CODE_SERVER_IDLE_TIMEOUT_SECONDS))) {
|
||||
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.")
|
||||
}
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue