Skip to content

Commit 26e8a35

Browse files
authored
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.
1 parent ebfc98d commit 26e8a35

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

scripts/coder-dev.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
88
# shellcheck disable=SC1091,SC1090
99
source "${SCRIPT_DIR}/lib.sh"
1010

11+
# Ensure that extant environment variables do not override
12+
# the config dir we use to override auth for dev.coder.com.
13+
unset CODER_SESSION_TOKEN
14+
unset CODER_URL
15+
1116
GOOS="$(go env GOOS)"
1217
GOARCH="$(go env GOARCH)"
1318
CODER_AGENT_URL="${CODER_AGENT_URL:-}"

scripts/develop.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}"
2121
use_proxy=0
2222
multi_org=0
2323

24+
# Ensure that extant environment variables do not override
25+
# the config dir we use to override auth for dev.coder.com.
26+
unset CODER_SESSION_TOKEN
27+
unset CODER_URL
28+
2429
args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization -- "$@")"
2530
eval set -- "$args"
2631
while true; do

0 commit comments

Comments
 (0)