File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,14 +53,22 @@ jobs:
5353 - name : Verify install.sh syntax
5454 run : bash -n install.sh
5555
56- - name : Test --ci flag parsing
56+ - name : Test --ci flag is recognized
5757 run : |
58- # Verify the script accepts --ci flag and outputs CI mode message
59- # Note: We can't run the full install in CI, just test parsing
60- bash -c 'source <(head -120 install.sh); echo "CI_MODE=$CI_MODE"'
58+ # Test that --ci flag prevents the non-interactive exit
59+ # The script will fail on missing deps (brew/apt), but should NOT fail with "NON-INTERACTIVE MODE NOT SUPPORTED"
60+ output=$(timeout 5 bash install.sh --ci 2>&1 || true)
6161
62- # Test that command_exists function works
63- bash -c '
64- source <(sed -n "117,120p" install.sh)
65- command_exists bash && echo "command_exists: OK"
66- '
62+ if echo "$output" | grep -q "NON-INTERACTIVE MODE NOT SUPPORTED"; then
63+ echo "ERROR: --ci flag not working - script still requires interactive mode"
64+ exit 1
65+ fi
66+
67+ if echo "$output" | grep -q "Running in CI mode"; then
68+ echo "SUCCESS: --ci flag recognized"
69+ else
70+ echo "WARNING: CI mode message not found, but non-interactive error also not present"
71+ fi
72+
73+ echo "Output preview:"
74+ echo "$output" | head -20
Original file line number Diff line number Diff line change 2525# CI mode (non-interactive):
2626# bash install.sh --ci Run in CI mode with defaults, no prompts, temp directory vault
2727
28+ # Parse --ci flag FIRST (before any checks that might exit)
29+ # This allows CI mode to bypass the non-interactive check
30+ CI_MODE=false
31+ for arg in " $@ " ; do
32+ if [ " $arg " = " --ci" ]; then
33+ CI_MODE=true
34+ break
35+ fi
36+ done
37+
2838# Create log file FIRST (before anything else)
2939LOG_FILE=" /tmp/interbrain-install-$( date +%Y%m%d-%H%M%S) .log"
3040
@@ -91,7 +101,7 @@ DREAMER_UUID=""
91101BRANCH=" main" # Default to main branch
92102TEST_FAIL=" "
93103TEST_RADICLE_FALLBACK=false
94- CI_MODE=false
104+ # CI_MODE already parsed above before non-interactive check
95105while [[ $# -gt 0 ]]; do
96106 case $1 in
97107 --uri)
You can’t perform that action at this time.
0 commit comments