core -- Fix pre-commit hook, cmd see many args
This commit is contained in:
parent
b86f3113ea
commit
83faf417c9
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue