mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix(self-hosted): use subshell for terminal checks in setup.sh (#46779)
This commit is contained in:
1 parent
289accd7d4
commit
2d422e4d9d
1 file changed
+3
-3
+3
-3
@@ -67,7 +67,7 @@ die() { printf "ERROR: %s\n" "$*" >&2; exit 1; }
|
||||
# Falls back to the default with -y or when no controlling terminal exists.
|
||||
ask() {
|
||||
# ask <prompt> <default> -> echoes chosen value
|
||||
if [ "$ASSUME_YES" = "1" ] || ! { : > /dev/tty; } 2>/dev/null; then
|
||||
if [ "$ASSUME_YES" = "1" ] || ! ( : < /dev/tty ) 2>/dev/null; then
|
||||
printf '%s' "$2"
|
||||
return
|
||||
fi
|
||||
@@ -281,8 +281,8 @@ current_site_url=$(read_env SITE_URL)
|
||||
[ -z "$current_api_url" ] && current_api_url="$current_public_url"
|
||||
[ -z "$current_site_url" ] && current_site_url="http://localhost:3000"
|
||||
|
||||
if [ "$ASSUME_YES" = "1" ] || ! { : > /dev/tty; } 2>/dev/null; then
|
||||
log "Non-interactive: keeping default URLs (edit .env to change)"
|
||||
if [ "$ASSUME_YES" = "1" ] || ! ( : < /dev/tty ) 2>/dev/null; then
|
||||
log "Non-interactive: using default URLs (edit .env to change)"
|
||||
else
|
||||
echo ""
|
||||
echo "Configure the main URLs (press Enter to accept the default)."
|
||||
|
||||
Reference in new issue
Block a user