Skip to content

Commit 9474158

Browse files
author
Alade Yessoufou
committed
fix: handle non-interactive mode for user prompts in init
Skip user.yml prompt in non-interactive mode instead of prompting
1 parent 8532fd7 commit 9474158

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

lib/commands/init.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,16 @@ EOF
257257
success "Created shipnode.conf"
258258
info "Edit shipnode.conf with your server details, then run: shipnode deploy"
259259

260-
# Optionally generate users.yml
261-
echo ""
262-
if prompt_yes_no "Add deployment users?"; then
263-
init_users_yaml
264-
else
260+
if [ "$non_interactive_flag" = true ]; then
265261
info "Skipped users.yml - create later with 'shipnode user sync'"
262+
else
263+
# Optionally generate users.yml
264+
echo ""
265+
if prompt_yes_no "Add deployment users?"; then
266+
init_users_yaml
267+
else
268+
info "Skipped users.yml - create later with 'shipnode user sync'"
269+
fi
266270
fi
267271
}
268272

0 commit comments

Comments
 (0)