Skip to content

Commit f38f746

Browse files
authored
chore: ensure coder is logged before querying orgs (#15618)
1 parent 78f9f43 commit f38f746

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/develop.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@ fatal() {
162162
# Check if credentials are already set up to avoid setting up again.
163163
"${CODER_DEV_SHIM}" list >/dev/null 2>&1 && touch "${PROJECT_ROOT}/.coderv2/developsh-did-first-setup"
164164

165-
if [ ! -f "${PROJECT_ROOT}/.coderv2/developsh-did-first-setup" ]; then
165+
if ! "${CODER_DEV_SHIM}" whoami >/dev/null 2>&1; then
166166
# Try to create the initial admin user.
167+
echo "Login required; use admin@coder.com and password '${password}'" >&2
168+
167169
if "${CODER_DEV_SHIM}" login http://127.0.0.1:3000 --first-user-username=admin --first-user-email=admin@coder.com --first-user-password="${password}" --first-user-full-name="Admin User" --first-user-trial=false; then
168170
# Only create this file if an admin user was successfully
169171
# created, otherwise we won't retry on a later attempt.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy