Skip to content

Commit

Permalink
don't prompt for confirmation if ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Sep 22, 2023
1 parent 01e7d05 commit 17bb572
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions private/scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17bb572

Please sign in to comment.