|
1 | 1 | from __future__ import unicode_literals |
2 | 2 |
|
3 | 3 | import contextlib |
| 4 | +import sys |
4 | 5 |
|
5 | 6 | from pre_commit.languages import helpers |
6 | 7 | from pre_commit.prefixed_command_runner import CalledProcessError |
@@ -32,18 +33,18 @@ def install_environment(repo_cmd_runner, version='default'): |
32 | 33 | try: |
33 | 34 | with clean_path_on_failure(env_dir): |
34 | 35 | repo_cmd_runner.run([ |
35 | | - 'python', '-m', 'nodeenv', '-n', 'system', |
| 36 | + sys.executable, '-m', 'nodeenv', '-n', 'system', |
36 | 37 | '{{prefix}}{0}'.format(ENVIRONMENT_DIR), |
37 | 38 | ]) |
38 | 39 | except CalledProcessError: |
39 | 40 | # TODO: log failure here |
40 | 41 | repo_cmd_runner.run([ |
41 | | - 'python', '-m', 'nodeenv', '--prebuilt', |
| 42 | + sys.executable, '-m', 'nodeenv', '--prebuilt', |
42 | 43 | '{{prefix}}{0}'.format(ENVIRONMENT_DIR) |
43 | 44 | ]) |
44 | 45 | else: |
45 | 46 | repo_cmd_runner.run([ |
46 | | - 'python', '-m', 'nodeenv', '--prebuilt', '-n', version, |
| 47 | + sys.executable, '-m', 'nodeenv', '--prebuilt', '-n', version, |
47 | 48 | '{{prefix}}{0}'.format(ENVIRONMENT_DIR) |
48 | 49 | ]) |
49 | 50 |
|
|
0 commit comments