mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(scripts): unset CODER_URL and CODER_SESSION_TOKEN for development server (#19620)
The coder-login module was recently updated to set environment variables instead of running `coder login`. This unfortunately broke `develop.sh`: ``` Encountered an error running "coder login", see "coder login --help" for more information error: Trace=[create api key: ] ``` Unsetting these env vars so that they do not interfere.
This commit is contained in:
@@ -8,6 +8,11 @@ SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
# shellcheck disable=SC1091,SC1090
|
||||
source "${SCRIPT_DIR}/lib.sh"
|
||||
|
||||
# Ensure that extant environment variables do not override
|
||||
# the config dir we use to override auth for dev.coder.com.
|
||||
unset CODER_SESSION_TOKEN
|
||||
unset CODER_URL
|
||||
|
||||
GOOS="$(go env GOOS)"
|
||||
GOARCH="$(go env GOARCH)"
|
||||
CODER_AGENT_URL="${CODER_AGENT_URL:-}"
|
||||
|
||||
@@ -21,6 +21,11 @@ password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}"
|
||||
use_proxy=0
|
||||
multi_org=0
|
||||
|
||||
# Ensure that extant environment variables do not override
|
||||
# the config dir we use to override auth for dev.coder.com.
|
||||
unset CODER_SESSION_TOKEN
|
||||
unset CODER_URL
|
||||
|
||||
args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization -- "$@")"
|
||||
eval set -- "$args"
|
||||
while true; do
|
||||
|
||||
Reference in New Issue
Block a user