bootstrap: make it work on Windows
gclient is a .bat file on Windows, and subprocess won't run it unless shell=True.
BUG=angleproject:1204
TEST=run in Linux and Windows 8
Change-Id: I1f94673f23ef25fe35df64ffd1ad04ed69626ad0
Reviewed-on: https://chromium-review.googlesource.com/312324
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Austin Kinross <aukinros@microsoft.com>
Tested-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/scripts/bootstrap.py b/scripts/bootstrap.py
index c278b2a..bfeac5b 100644
--- a/scripts/bootstrap.py
+++ b/scripts/bootstrap.py
@@ -12,21 +12,16 @@
def main():
- gclient_cmd = [
- 'gclient', 'config',
- '--name', 'change2dot',
- '--unmanaged',
- 'https://chromium.googlesource.com/angle/angle.git'
- ]
- cmd_str = ' '.join(gclient_cmd)
+ gclient_cmd = ('gclient config --name change2dot --unmanaged '
+ 'https://chromium.googlesource.com/angle/angle.git')
try:
- rc = subprocess.call(gclient_cmd)
+ rc = subprocess.call(gclient_cmd, shell=True)
except OSError:
- print 'could not run "%s" - is gclient installed?' % cmd_str
+ print 'could not run "%s" via shell' % gclient_cmd
sys.exit(1)
if rc:
- print 'failed command: "%s"' % cmd_str
+ print 'failed command: "%s"' % gclient_cmd
sys.exit(1)
with open('.gclient') as gclient_file: