Skip to content

Commit e83a296

Browse files
committed
chore: Clean up debug code from start.sh
1 parent feb3650 commit e83a296

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

build-scripts/run/start.sh

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,7 @@ PROJECT=${1:-unnamed_dspace}
88

99
echo "Using envfile: [$ENVFILE] for project: [$PROJECT]"
1010

11-
# Debug: Check what's in the environment before anything
12-
echo "DEBUG: Environment check before sourcing:"
13-
echo " ADMIN_PASSWORD in env: $(printenv ADMIN_PASSWORD > /dev/null 2>&1 && echo 'yes' || echo 'NO')"
14-
echo " USER_PASSWORD in env: $(printenv USER_PASSWORD > /dev/null 2>&1 && echo 'yes' || echo 'NO')"
15-
echo " ADMIN_PASSWORD value length: ${#ADMIN_PASSWORD}"
16-
echo " USER_PASSWORD value length: ${#USER_PASSWORD}"
17-
18-
# Preserve passwords if they're already set - they take precedence over env file
19-
SAVED_ADMIN_PASSWORD="$(printenv ADMIN_PASSWORD || echo '')"
20-
SAVED_USER_PASSWORD="$(printenv USER_PASSWORD || echo '')"
21-
22-
# Debug: show what we're preserving
23-
echo "DEBUG: Preserving ADMIN_PASSWORD: $(if [[ -n "$SAVED_ADMIN_PASSWORD" ]]; then echo 'yes'; else echo 'NO'; fi)"
24-
echo "DEBUG: Preserving USER_PASSWORD: $(if [[ -n "$SAVED_USER_PASSWORD" ]]; then echo 'yes'; else echo 'NO'; fi)"
25-
26-
# Source env file while preventing password override
27-
# set -a: automatically export all variables set from now on
28-
set -a
2911
source $ENVFILE
30-
# set +a: disable automatic export (back to normal behavior)
31-
set +a
32-
33-
# Restore passwords - they take precedence over env file values
34-
if [[ -n "$SAVED_ADMIN_PASSWORD" ]]; then
35-
export ADMIN_PASSWORD="$SAVED_ADMIN_PASSWORD"
36-
fi
37-
if [[ -n "$SAVED_USER_PASSWORD" ]]; then
38-
export USER_PASSWORD="$SAVED_USER_PASSWORD"
39-
fi
40-
41-
# Debug output to verify passwords are set after restoration
42-
echo "DEBUG: After restore - ADMIN_PASSWORD is $(if [[ -n "$ADMIN_PASSWORD" ]]; then echo 'set'; else echo 'NOT set'; fi)"
43-
echo "DEBUG: After restore - USER_PASSWORD is $(if [[ -n "$USER_PASSWORD" ]]; then echo 'set'; else echo 'NOT set'; fi)"
4412

4513
# docker-compose does not pull those that have `build` section?!
4614
echo "====="

0 commit comments

Comments
 (0)