Commit 6afd0c36 authored by maruel@chromium.org's avatar maruel@chromium.org

Do not assume gclient is in the PATH.

Also specify the batch file on Windows. Python's subprocess is picky about that.

TBR=rogerta@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/10939008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@157337 0039d316-1c4b-4281-b951-d872f2087c98
parent 1833e57b
...@@ -22,6 +22,8 @@ import gclient_utils ...@@ -22,6 +22,8 @@ import gclient_utils
import rietveld import rietveld
import scm import scm
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def main(): def main():
parser = optparse.OptionParser(description=sys.modules[__name__].__doc__) parser = optparse.OptionParser(description=sys.modules[__name__].__doc__)
...@@ -119,8 +121,11 @@ def main(): ...@@ -119,8 +121,11 @@ def main():
'A DEPS file was updated inside a gclient checkout, running gclient ' 'A DEPS file was updated inside a gclient checkout, running gclient '
'sync.') 'sync.')
base_rev = 'BASE' if scm_type == 'svn' else 'HEAD' base_rev = 'BASE' if scm_type == 'svn' else 'HEAD'
gclient_path = os.path.join(BASE_DIR, 'gclient')
if sys.platform == 'win32':
gclient_path += '.bat'
return subprocess.call( return subprocess.call(
['gclient', 'sync', '--revision', base_rev], cwd=gclient_root) [gclient_path, 'sync', '--revision', base_rev], cwd=gclient_root)
return 0 return 0
......
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