Skip to content

Commit 3c5c003

Browse files
committed
fix(site/run): always pass explicit scope flag; default to --user
1 parent 2af30fe commit 3c5c003

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

site/run.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ while [[ $# -gt 0 ]]; do
3030
done
3131
INSTALL_ARGS=("${BOOT_ARGS[@]}"); [[ $# -gt 0 ]] && INSTALL_ARGS+=("$@")
3232

33-
# Determine desired scope from forwarded flags (default: user)
34-
SCOPE="user"
33+
# Determine desired scope from forwarded flags (default: user) and ensure flag is passed through
34+
SCOPE="user"; HAVE_SCOPE_FLAG=0
3535
for a in "${INSTALL_ARGS[@]}"; do
36-
case "$a" in --global) SCOPE="global" ;; --user) SCOPE="user" ;; esac
36+
case "$a" in --global) SCOPE="global"; HAVE_SCOPE_FLAG=1 ;; --user) SCOPE="user"; HAVE_SCOPE_FLAG=1 ;; esac
3737
done
38+
if [[ $HAVE_SCOPE_FLAG -eq 0 ]]; then
39+
INSTALL_ARGS+=("--${SCOPE}")
40+
fi
3841

3942
# Default to enabling MOTD unless explicitly provided
4043
has_with_motd=0

0 commit comments

Comments
 (0)