mirror of
https://github.com/ansible/awx.git
synced 2026-01-07 14:02:07 -03:30
Only block commits if black fails for certain paths (#14531)
This commit is contained in:
parent
c97a48b165
commit
9745058546
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
if [ -z $AWX_IGNORE_BLACK ] ; then
|
||||
python_files_changed=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.py$')
|
||||
python_files_changed=$(git diff --cached --name-only --diff-filter=AM awx/ awxkit/ tools/ | grep -E '\.py$')
|
||||
if [ "x$python_files_changed" != "x" ] ; then
|
||||
black --check $python_files_changed || \
|
||||
if [ $? != 0 ] ; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user