From aff12de30aa53a33e873ef14964ff8d6b5797e9d Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Wed, 26 Jun 2024 15:52:08 -0600 Subject: [PATCH] move the messaging about the theme not being in the list up to that check we can also remove the conditional around activation because if it's in the list, we should be able to activate it --- private/scripts/helpers.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/private/scripts/helpers.sh b/private/scripts/helpers.sh index f2fb9b26..dd67d739 100755 --- a/private/scripts/helpers.sh +++ b/private/scripts/helpers.sh @@ -486,21 +486,17 @@ function clean_up() { if ! echo "$themelist" | grep -q "$sagename"; then echo "${red}Theme $sagename not found in the theme list. Exiting here.${normal}" - echo "$themelist" - exit 1; - fi - - # Activate the new theme - echo "${yellow}Activating the ${sagename} theme.${normal}" - if ! terminus wp -- "$sitename"."$siteenv" theme activate "$sagename"; then terminus wp -- "$sitename"."$siteenv" theme list - echo "${red}Theme activation failed. Exiting here.${normal}" echo "Check the theme list above. If the theme you created is not listed, it's possible that the deploy has not completed. You can try again in a few minutes using the following command:" echo "terminus wp -- $sitename.dev theme activate $sagename" echo "Once you do this, you will need to open the site to generate the requisite files and then commit them in SFTP mode." exit 1; fi + # Activate the new theme + echo "${yellow}Activating the ${sagename} theme.${normal}" + terminus wp -- "$sitename"."$siteenv" theme activate "$sagename" + # If this is a CI environment, stop here. if [ "$is_ci" == 1 ]; then echo "${yellow}CI detected. All done here.${normal} 🍵"