Skip to content

Instantly share code, notes, and snippets.

View lushang's full-sized avatar

Lushang lushang

View GitHub Profile
#!/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