mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use nodeenv with python -m
This commit is contained in:
parent
3279eab616
commit
f1575b4f7b
1 changed files with 3 additions and 3 deletions
|
|
@ -32,18 +32,18 @@ def install_environment(repo_cmd_runner, version='default'):
|
|||
try:
|
||||
with clean_path_on_failure(env_dir):
|
||||
repo_cmd_runner.run([
|
||||
'nodeenv', '-n', 'system',
|
||||
'python', '-m', 'nodeenv', '-n', 'system',
|
||||
'{{prefix}}{0}'.format(ENVIRONMENT_DIR),
|
||||
])
|
||||
except CalledProcessError:
|
||||
# TODO: log failure here
|
||||
repo_cmd_runner.run([
|
||||
'nodeenv', '--prebuilt',
|
||||
'python', '-m', 'nodeenv', '--prebuilt',
|
||||
'{{prefix}}{0}'.format(ENVIRONMENT_DIR)
|
||||
])
|
||||
else:
|
||||
repo_cmd_runner.run([
|
||||
'nodeenv', '--prebuilt', '-n', version,
|
||||
'python', '-m', 'nodeenv', '--prebuilt', '-n', version,
|
||||
'{{prefix}}{0}'.format(ENVIRONMENT_DIR)
|
||||
])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue