Merge pull request #542 from pre-commit/virtualenv_no_download

Use VIRTUALENV_NO_DOWNLOAD in pre-commit
This commit is contained in:
Anthony Sottile 2017-06-01 20:29:17 -07:00 committed by GitHub
commit fc907b512a

View file

@ -72,7 +72,8 @@ def install_environment(
venv_cmd.extend(['-p', norm_version(version)]) venv_cmd.extend(['-p', norm_version(version)])
else: else:
venv_cmd.extend(['-p', os.path.realpath(sys.executable)]) venv_cmd.extend(['-p', os.path.realpath(sys.executable)])
repo_cmd_runner.run(venv_cmd, cwd='/') venv_env = dict(os.environ, VIRTUALENV_NO_DOWNLOAD='1')
repo_cmd_runner.run(venv_cmd, cwd='/', env=venv_env)
with in_env(repo_cmd_runner, version): with in_env(repo_cmd_runner, version):
helpers.run_setup_cmd( helpers.run_setup_cmd(
repo_cmd_runner, repo_cmd_runner,