Skip to content

Commit 9745058

Browse files
authored
Only block commits if black fails for certain paths (#14531)
1 parent c97a48b commit 9745058

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-commit.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
if [ -z $AWX_IGNORE_BLACK ] ; then
3-
python_files_changed=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.py$')
3+
python_files_changed=$(git diff --cached --name-only --diff-filter=AM awx/ awxkit/ tools/ | grep -E '\.py$')
44
if [ "x$python_files_changed" != "x" ] ; then
55
black --check $python_files_changed || \
66
if [ $? != 0 ] ; then

0 commit comments

Comments
 (0)