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 |