core -- Fix pre-commit hook, cmd see many args #625
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ if type black &>/dev/null; then
|
||||||
touch $BLACK_OUTPUT
|
touch $BLACK_OUTPUT
|
||||||
|
|
||||||
if ! black --check "$STAGED_PYTHON_FILES" &>$BLACK_OUTPUT; then
|
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
|
tail -1 $BLACK_OUTPUT
|
||||||
formatter_updated=1
|
formatter_updated=1
|
||||||
else
|
else
|
||||||
|
@ -48,7 +48,7 @@ if type isort &>/dev/null; then
|
||||||
touch $ISORT_OUTPUT
|
touch $ISORT_OUTPUT
|
||||||
|
|
||||||
if ! isort --check-only "$STAGED_PYTHON_FILES" &>$ISORT_OUTPUT; then
|
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"
|
printf "Reformatted.\n"
|
||||||
formatter_updated=1
|
formatter_updated=1
|
||||||
else
|
else
|
||||||
|
@ -71,7 +71,7 @@ if type flake8 &>/dev/null; then
|
||||||
FLAKE8_OUTPUT="/tmp/gc-flake8-output.log"
|
FLAKE8_OUTPUT="/tmp/gc-flake8-output.log"
|
||||||
touch $FLAKE8_OUTPUT
|
touch $FLAKE8_OUTPUT
|
||||||
|
|
||||||
if ! flake8 "$STAGED_PYTHON_FILES" &>$FLAKE8_OUTPUT; then
|
if ! flake8 $STAGED_PYTHON_FILES &>$FLAKE8_OUTPUT; then
|
||||||
printf "FAIL\n"
|
printf "FAIL\n"
|
||||||
cat $FLAKE8_OUTPUT
|
cat $FLAKE8_OUTPUT
|
||||||
checker_dirty=1
|
checker_dirty=1
|
||||||
|
|
Loading…
Reference in a new issue