Commit b49c9bf9 by Frank Henigman

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/312324Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarAustin Kinross <aukinros@microsoft.com> Tested-by: 's avatarFrank Henigman <fjhenigman@chromium.org>
parent daa8c27f
...@@ -12,21 +12,16 @@ import sys ...@@ -12,21 +12,16 @@ import sys
def main(): def main():
gclient_cmd = [ gclient_cmd = ('gclient config --name change2dot --unmanaged '
'gclient', 'config', 'https://chromium.googlesource.com/angle/angle.git')
'--name', 'change2dot',
'--unmanaged',
'https://chromium.googlesource.com/angle/angle.git'
]
cmd_str = ' '.join(gclient_cmd)
try: try:
rc = subprocess.call(gclient_cmd) rc = subprocess.call(gclient_cmd, shell=True)
except OSError: except OSError:
print 'could not run "%s" - is gclient installed?' % cmd_str print 'could not run "%s" via shell' % gclient_cmd
sys.exit(1) sys.exit(1)
if rc: if rc:
print 'failed command: "%s"' % cmd_str print 'failed command: "%s"' % gclient_cmd
sys.exit(1) sys.exit(1)
with open('.gclient') as gclient_file: with open('.gclient') as gclient_file:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment