From 6300f1c5452c7e66b0831990132f7a8e5a6abfe2 Mon Sep 17 00:00:00 2001 From: Marcus Quinn <6428977+marcusquinn@users.noreply.github.com> Date: Tue, 17 Mar 2026 19:33:00 +0000 Subject: [PATCH] fix: remove duplicate deployment echo in build.sh (#80) * fix: remove duplicate deployment echo in build.sh Remove duplicate 'Deploying to local WordPress installation...' message. Replace printf with echo "" for blank line separator to avoid \n rendering issues without -e flag. Closes #70 * fix: use ${WP_LOCAL_PLUGIN_DIR:-} for bash nounset safety in build.sh Addresses CodeRabbit Major review feedback on PR #80. Direct dereference of $WP_LOCAL_PLUGIN_DIR under set -u causes the script to exit when the variable is unset, even though local deployment is optional. Using ${WP_LOCAL_PLUGIN_DIR:-} safely handles the unset case without triggering nounset. --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 98c410e..a9d1490 100755 --- a/build.sh +++ b/build.sh @@ -83,8 +83,8 @@ if [ -f "$ZIP_FILE" ]; then echo "File path: $(pwd)/$ZIP_FILE" # Deploy to local WordPress installation if environment variable is set - if [ -n "$WP_LOCAL_PLUGIN_DIR" ]; then - printf '\nDeploying to local WordPress installation...\n' + if [ -n "${WP_LOCAL_PLUGIN_DIR:-}" ]; then + echo "" echo "Deploying to local WordPress installation..." # Remove existing plugin directory.