From 4772370a058003d3bd848bae6d9c4837404bdfa3 Mon Sep 17 00:00:00 2001 From: Tyler <71953103+fntyler@users.noreply.github.com> Date: Wed, 3 Jun 2026 17:41:57 -0400 Subject: [PATCH] BRE-1893 fix(marketplace): guard setup wizard against non-interactive shells (#520) --- CommonMarketplace/files/opt/bitwarden/setup-wizard.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CommonMarketplace/files/opt/bitwarden/setup-wizard.sh b/CommonMarketplace/files/opt/bitwarden/setup-wizard.sh index 2c5c1d1..5cd0f1a 100644 --- a/CommonMarketplace/files/opt/bitwarden/setup-wizard.sh +++ b/CommonMarketplace/files/opt/bitwarden/setup-wizard.sh @@ -4,6 +4,11 @@ # Runs once on first interactive login to select the deployment edition. # +# Don't run the interactive wizard in a non-interactive session +if [ ! -t 0 ] || [ ! -t 1 ]; then + exit 0 +fi + cat <<'EOF' ################################################################################ @@ -30,7 +35,7 @@ cat <<'EOF' EOF while true; do - read -rp " Enter selection [1 or 2]: " SELECTION + read -rp " Enter selection [1 or 2]: " SELECTION || exit 0 case "$SELECTION" in 1) EDITION="standard"