Fix non-zero exit code even if the script succeed (#1302)

The script succeeded but the exit code is 1 because it's not a dryrun so the last command failed.
This commit is contained in:
Sen Jiang
2016-10-25 07:35:01 -07:00
committed by Jeff Kaufman
parent 09478cac70
commit 62c66e2c9c
+3 -1
View File
@@ -524,7 +524,9 @@ Not deleting $directory; name is suspiciously short. Something is wrong."
echo "You'll also need to configure ngx_pagespeed if you haven't yet:"
echo " https://developers.google.com/speed/pagespeed/module/configuration"
fi
"$DRYRUN" && echo "[this was a dry run; your system is unchanged]"
if "$DRYRUN"; then
echo "[this was a dry run; your system is unchanged]"
fi
}
# Start running things from a call at the end so if this script is executed