Created
July 8, 2021 14:55
-
-
Save aidan-harding/7fc6936ba08f8ea4970399f96f5a5c72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# | |
# Check that sfdx force:source:status is clean before committing | |
# Put this into .git/hooks/pre-commit | |
if ! sfdx force:source:status --json | jq -r '.result | length' | grep '^0$' &> /dev/null; | |
then | |
echo "Error: sfdx source is not synced with remote" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment