diff options
author | anatoly techtonik <techtonik@gmail.com> | 2013-09-21 19:29:10 +0300 |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2013-09-21 20:03:57 +0300 |
commit | 3a2a59eb87b58a4b5a26349434db322846cb6b57 (patch) | |
tree | cb8da8261bd7efe57a00c2488fc9ece582062b9c | |
parent | 45d21685b93f80b67239849b2d2cfe6b217e335a (diff) | |
download | git-repo-3a2a59eb87b58a4b5a26349434db322846cb6b57.tar.gz |
repo: use explicit Python executable to run main.py
Small step to support non-POSIX platforms.
Change-Id: I3bdb9c82c2dfbacb1da328caaa1a406ab91ad675
-rwxr-xr-x | repo | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -719,7 +719,7 @@ def main(orig_args): | |||
719 | repo_main = my_main | 719 | repo_main = my_main |
720 | 720 | ||
721 | ver_str = '.'.join(map(str, VERSION)) | 721 | ver_str = '.'.join(map(str, VERSION)) |
722 | me = [repo_main, | 722 | me = [sys.executable, repo_main, |
723 | '--repo-dir=%s' % rel_repo_dir, | 723 | '--repo-dir=%s' % rel_repo_dir, |
724 | '--wrapper-version=%s' % ver_str, | 724 | '--wrapper-version=%s' % ver_str, |
725 | '--wrapper-path=%s' % wrapper_path, | 725 | '--wrapper-path=%s' % wrapper_path, |
@@ -727,7 +727,7 @@ def main(orig_args): | |||
727 | me.extend(orig_args) | 727 | me.extend(orig_args) |
728 | me.extend(extra_args) | 728 | me.extend(extra_args) |
729 | try: | 729 | try: |
730 | os.execv(repo_main, me) | 730 | os.execv(sys.executable, me) |
731 | except OSError as e: | 731 | except OSError as e: |
732 | print("fatal: unable to start %s" % repo_main, file=sys.stderr) | 732 | print("fatal: unable to start %s" % repo_main, file=sys.stderr) |
733 | print("fatal: %s" % e, file=sys.stderr) | 733 | print("fatal: %s" % e, file=sys.stderr) |