summaryrefslogtreecommitdiffstats
path: root/pre-commit.sh
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2023-10-10 16:12:57 +0200
committerGitHub <noreply@github.com>2023-10-10 16:12:57 +0200
commit97450585467c4362407f40d7875f06b5acd71b2f (patch)
treeb9bb6d96230675e442d9983e67c7b8f5797a6eff /pre-commit.sh
parentFix: #14510 Add alt-text codeblock to Images for Userguide: jobs.rst (#14530) (diff)
downloadawx-97450585467c4362407f40d7875f06b5acd71b2f.tar.xz
awx-97450585467c4362407f40d7875f06b5acd71b2f.zip
Only block commits if black fails for certain paths (#14531)23.3.0
Diffstat (limited to 'pre-commit.sh')
-rwxr-xr-xpre-commit.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pre-commit.sh b/pre-commit.sh
index 003106216b..546bcab23f 100755
--- a/pre-commit.sh
+++ b/pre-commit.sh
@@ -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