From dcc1679081032b87eb5d3ee1b3b04c8711ac6b21 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 28 Aug 2025 16:55:52 +0100 Subject: [PATCH 1/2] fix(scripts): unset CODER_URL and CODER_SESSION_TOKEN for development server --- scripts/coder-dev.sh | 4 ++++ scripts/develop.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/coder-dev.sh b/scripts/coder-dev.sh index 51c198166942b..52003bbcd8049 100755 --- a/scripts/coder-dev.sh +++ b/scripts/coder-dev.sh @@ -8,6 +8,10 @@ SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}") # shellcheck disable=SC1091,SC1090 source "${SCRIPT_DIR}/lib.sh" +# Ensure that these do not interfere with the below. +unset CODER_SESSION_TOKEN +unset CODER_URL + GOOS="$(go env GOOS)" GOARCH="$(go env GOARCH)" CODER_AGENT_URL="${CODER_AGENT_URL:-}" diff --git a/scripts/develop.sh b/scripts/develop.sh index 23efe67576813..08cfa44839cf0 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -21,6 +21,10 @@ password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}" use_proxy=0 multi_org=0 +# Ensure that these do not interfere with the below. +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 From 34c0abfd419a358a381823d402bf07b4658ac906 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 28 Aug 2025 17:28:53 +0100 Subject: [PATCH 2/2] improve comment --- scripts/coder-dev.sh | 3 ++- scripts/develop.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/coder-dev.sh b/scripts/coder-dev.sh index 52003bbcd8049..77f88caa684aa 100755 --- a/scripts/coder-dev.sh +++ b/scripts/coder-dev.sh @@ -8,7 +8,8 @@ SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}") # shellcheck disable=SC1091,SC1090 source "${SCRIPT_DIR}/lib.sh" -# Ensure that these do not interfere with the below. +# 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 diff --git a/scripts/develop.sh b/scripts/develop.sh index 08cfa44839cf0..8df69bfc111d9 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -21,7 +21,8 @@ password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}" use_proxy=0 multi_org=0 -# Ensure that these do not interfere with the below. +# 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