Skip to content

Commit

Permalink
More stable git status check in publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-sokolov committed Jun 9, 2017
1 parent 225d5c4 commit f27cb05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/publish-website
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -o nounset
set -o errexit

git_status="$(git status 2> /dev/null)"
git_status="$(git status -z 2> /dev/null)"

if [[ ! ${git_status} =~ "working directory clean" ]]; then
if [[ ! -z ${git_status} ]]; then
echo "You still have changes in your current branch. Commit everything before publishing."
exit 1
fi
Expand Down

0 comments on commit f27cb05

Please sign in to comment.