Commit a991ac69 authored by Scott Graham's avatar Scott Graham Committed by Commit Bot

gn: Look in src for gn binaries before trying old buildtools location

Bug: 855791
Change-Id: I964df1a781da4335e9b77192faf7913d3546de13
Reviewed-on: https://chromium-review.googlesource.com/1112817Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
parent 1d5659c8
...@@ -19,6 +19,15 @@ import sys ...@@ -19,6 +19,15 @@ import sys
def main(args): def main(args):
# Try in primary solution location first, with the gn binary having been
# downloaded by cipd in the projects DEPS.
gn_path = os.path.join(gclient_utils.GetPrimarySolutionPath(), 'third_party',
'gn', 'gn' + gclient_utils.GetExeSuffix())
if os.path.exists(gn_path):
return subprocess.call([gn_path] + args[1:])
# Otherwise try the old .sha1 and download_from_google_storage locations
# inside of buildtools.
bin_path = gclient_utils.GetBuildtoolsPlatformBinaryPath() bin_path = gclient_utils.GetBuildtoolsPlatformBinaryPath()
if not bin_path: if not bin_path:
print >> sys.stderr, ('gn.py: Could not find checkout in any parent of ' print >> sys.stderr, ('gn.py: Could not find checkout in any parent of '
......
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