mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 04:50:20 -06:00
Make isolated environments more isolated under OSX and pyvenv. Resolves #217.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user