silence the output of command -v

This commit is contained in:
Anthony Sottile 2021-10-28 21:21:59 -07:00 committed by Esteban Zapata Rojas
parent 7dbbb65063
commit 9e2ec6e98c

View file

@ -12,7 +12,7 @@ ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
elif command -v pre-commit; then elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}" exec pre-commit "${ARGS[@]}"
else else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2 echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2