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.
This commit is contained in:
2026-03-17 19:33:00 +00:00
committed by GitHub
parent c3738a3106
commit 6300f1c545

View File

@@ -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.