From 7e69d117c6d67aa6ac522a7570999457a9708be4 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 24 Jul 2018 16:05:26 -0700 Subject: [PATCH] Work around sys.executable issue using brew python on macos https://github.com/Homebrew/homebrew-core/issues/30445 --- pre_commit/resources/hook-tmpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pre_commit/resources/hook-tmpl b/pre_commit/resources/hook-tmpl index d3575857..cb25ec50 100755 --- a/pre_commit/resources/hook-tmpl +++ b/pre_commit/resources/hook-tmpl @@ -7,6 +7,9 @@ import os import subprocess import sys +# work around https://github.com/Homebrew/homebrew-core/issues/30445 +os.environ.pop('__PYVENV_LAUNCHER__', None) + HERE = os.path.dirname(os.path.abspath(__file__)) Z40 = '0' * 40 ID_HASH = '138fd403232d2ddd5efb44317e38bf03'