Make depot_tools' fetch work on windows if 'gclient' isn't in the path
TBR=maruel@chromium.org, agable@chromium.org
BUG=
Review URL: https://codereview.chromium.org/13589003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192170 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/fetch.py b/fetch.py
index 25f9174..249b50b 100755
--- a/fetch.py
+++ b/fetch.py
@@ -62,7 +62,9 @@
def run_gclient(self, *cmd, **kwargs):
print 'Running: gclient %s' % ' '.join(pipes.quote(x) for x in cmd)
if not self.dryrun:
- return subprocess.check_call(('gclient',) + cmd, **kwargs)
+ return subprocess.check_call(
+ (sys.executable, os.path.join(SCRIPT_PATH, 'gclient.py')) + cmd,
+ **kwargs)
class GitCheckout(Checkout):