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:
Cian Johnston
2025-08-28 17:42:50 +01:00
committed by GitHub
parent ebfc98df58
commit 26e8a35af0
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -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:-}"