Make isolated environments more isolated under OSX and pyvenv. Resolves #217.

This commit is contained in:
Anthony Sottile
2015-04-08 13:59:25 -07:00
parent a76c902394
commit cdf726bbed

View File

@@ -1,6 +1,7 @@
from __future__ import unicode_literals
import argparse
import os
import sys
import pkg_resources
@@ -15,6 +16,13 @@ from pre_commit.error_handler import error_handler
from pre_commit.runner import Runner
# https://github.com/pre-commit/pre-commit/issues/217
# On OSX, making a virtualenv using pyvenv at . causes `virtualenv` and `pip`
# to install packages to the wrong place. We don't want anything to deal with
# pyvenv
os.environ.pop('__PYVENV_LAUNCHER__', None)
def main(argv=None):
argv = argv if argv is not None else sys.argv[1:]
parser = argparse.ArgumentParser()