Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: recipes.py

Issue 2136303002: Fix bootstrap on windows (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Nit Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipes.py
diff --git a/recipes.py b/recipes.py
index e71420e5d7307ac9d5dd5150456cccecbcdbc05e..092917380efe1d30abd991da98930ddf020def73 100755
--- a/recipes.py
+++ b/recipes.py
@@ -12,6 +12,7 @@ infra/config/recipes.cfg.
import argparse
import json
import logging
+import platform
import os
import subprocess
import sys
@@ -390,10 +391,11 @@ def main():
os.environ['RECIPES_RUN_BOOTSTRAP'] = '1'
args = sys.argv
- return subprocess.call(
- [os.path.join(
- os.path.dirname(os.path.realpath(__file__)), 'ENV/bin/python'),
- os.path.join(ROOT_DIR, 'recipes.py')] + original_sys_argv[1:])
+ executable = ('python.exe' if sys.platform.lower() in (
+ 'win32', 'cygwin') else 'python')
+ return subprocess.call([os.path.join(
+ ROOT_DIR, 'ENV', 'bin', executable),
+ os.path.join(ROOT_DIR, 'recipes.py')] + original_sys_argv[1:])
if args.verbose:
logging.getLogger().setLevel(logging.INFO)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698