From 17bb57285e4c2522c915ca467bcc321ec02390cd Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Fri, 22 Sep 2023 11:14:50 -0600 Subject: [PATCH] don't prompt for confirmation if ci --- private/scripts/helpers.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/private/scripts/helpers.sh b/private/scripts/helpers.sh index bf41900f..c91c74fa 100755 --- a/private/scripts/helpers.sh +++ b/private/scripts/helpers.sh @@ -149,15 +149,16 @@ function get_info() { Theme name: ${sagename} SFTP username: ${sftpuser} SFTP hostname: ${sftphost}" - read -p "Is this correct? (y/n) " -n 1 -r - # If the user enters n, redo the prompts. - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Restarting..." - - # Toggle the restarted state. - is_restarted=1 - - get_info + if [ "$is_ci" != 1 ]; then + read -p "Is this correct? (y/n) " -n 1 -r + # If the user enters n, redo the prompts. + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Restarting..." + + # Toggle the restarted state. + is_restarted=1 + get_info + fi fi if [ -z "$sitename" ] || [ -z "$sagename" ] || [ -z "$sftpuser" ] || [ -z "$sftphost" ]; then