Merge pull request #27715 from woocommerce/fix/post-merge-script-exit-status

Fix post-merge.sh exit status
This commit is contained in:
Claudio Sanches 2020-09-21 16:15:19 -03:00 committed by GitHub
commit ed4750f97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,10 @@
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
runOnChange() {
echo "$changedFiles" | grep -q "$1" && eval "$2"
if echo "$changedFiles" | grep -q "$1"
then
eval "$2"
fi
}
runOnChange "package-lock.json" "npm install"