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:
4
build.sh
4
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.
|
||||
|
||||
Reference in New Issue
Block a user