diff --git a/.pre-commit.sh b/.pre-commit.sh index 30f09eb9..b9985979 100755 --- a/.pre-commit.sh +++ b/.pre-commit.sh @@ -24,7 +24,7 @@ if type black &>/dev/null; then touch $BLACK_OUTPUT if ! black --check "$STAGED_PYTHON_FILES" &>$BLACK_OUTPUT; then - black "$STAGED_PYTHON_FILES" &>$BLACK_OUTPUT + black $STAGED_PYTHON_FILES &>$BLACK_OUTPUT tail -1 $BLACK_OUTPUT formatter_updated=1 else @@ -48,7 +48,7 @@ if type isort &>/dev/null; then touch $ISORT_OUTPUT if ! isort --check-only "$STAGED_PYTHON_FILES" &>$ISORT_OUTPUT; then - isort "$STAGED_PYTHON_FILES" &>$ISORT_OUTPUT + isort $STAGED_PYTHON_FILES &>$ISORT_OUTPUT printf "Reformatted.\n" formatter_updated=1 else @@ -71,7 +71,7 @@ if type flake8 &>/dev/null; then FLAKE8_OUTPUT="/tmp/gc-flake8-output.log" touch $FLAKE8_OUTPUT - if ! flake8 "$STAGED_PYTHON_FILES" &>$FLAKE8_OUTPUT; then + if ! flake8 $STAGED_PYTHON_FILES &>$FLAKE8_OUTPUT; then printf "FAIL\n" cat $FLAKE8_OUTPUT checker_dirty=1