Skip to content

Commit

Permalink
Add more robust handling in check-dirty-tree.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
bskinn committed Mar 29, 2024
1 parent 0fd205a commit bf770ba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/check-dirty-tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ fi

git status | grep modified:

if [ $? = 0 ]
RESULT=$?

if [ $RESULT = 0 ]
then
# grep found something modified, reject
exit 1
elif [ $RESULT = 1 ]
# grep didn't find anything, we're ok
exit 0
else
# Some other error
exit $RESULT
fi

0 comments on commit bf770ba

Please sign in to comment.