depot/third_party/nixpkgs/pkgs/tools/misc/pre-commit/hook-tmpl.patch
Default email 3cbfd2b52c Project import generated by Copybara.
GitOrigin-RevId: 395879c28386e1abf20c7ecacd45880759548391
2021-12-18 20:06:50 -05:00

15 lines
598 B
Diff

diff --git a/pre_commit/resources/hook-tmpl b/pre_commit/resources/hook-tmpl
index 53d29f9..66a8ad3 100755
--- a/pre_commit/resources/hook-tmpl
+++ b/pre_commit/resources/hook-tmpl
@@ -10,9 +10,7 @@ ARGS=(hook-impl)
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
-if [ -x "$INSTALL_PYTHON" ]; then
- exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
-elif command -v pre-commit > /dev/null; then
+if command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}"
else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2