summaryrefslogtreecommitdiff
path: root/misc/hooks/pre-commit-black
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-24 20:21:18 +0200
committerGitHub <noreply@github.com>2020-04-24 20:21:18 +0200
commit33fe7632591d32e5d9ac4339a2765dd9321eefc3 (patch)
treecd2b820353afd7507b43c26e8b22fae6c9e86513 /misc/hooks/pre-commit-black
parent58cbec8db324d60f6367e7ed99c9036abc162203 (diff)
parent05f041127d3811fe44403d72784ac7553f6681c3 (diff)
Merge pull request #38184 from bruvzg/git_hooks_silent
Git Hooks: Suppress "which" error messages.
Diffstat (limited to 'misc/hooks/pre-commit-black')
-rwxr-xr-xmisc/hooks/pre-commit-black10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/hooks/pre-commit-black b/misc/hooks/pre-commit-black
index 633b432b89..76d97294da 100755
--- a/misc/hooks/pre-commit-black
+++ b/misc/hooks/pre-commit-black
@@ -6,7 +6,7 @@
##################################################################
# SETTINGS
# Set path to black binary.
-BLACK=`which black`
+BLACK=`which black 2>/dev/null`
BLACK_OPTIONS="-l 120"
# Remove any older patches from previous commits. Set to true or false.
@@ -18,7 +18,7 @@ FILE_EXTS="py"
# Use pygmentize instead of cat to parse diff with highlighting.
# Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac)
-PYGMENTIZE=`which pygmentize`
+PYGMENTIZE=`which pygmentize 2>/dev/null`
if [ ! -z "$PYGMENTIZE" ]; then
READER="pygmentize -l diff"
else
@@ -26,13 +26,13 @@ else
fi
# Path to zenity
-ZENITY=`which zenity`
+ZENITY=`which zenity 2>/dev/null`
# Path to xmessage
-XMSG=`which xmessage`
+XMSG=`which xmessage 2>/dev/null`
# Path to powershell (Windows only)
-PWSH=`which powershell`
+PWSH=`which powershell 2>/dev/null`
##################################################################
# There should be no need to change anything below this line.