From a991ac69eb052dfbd460459203d4946168622385 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Tue, 26 Jun 2018 23:19:51 +0000 Subject: [PATCH] gn: Look in src for gn binaries before trying old buildtools location Bug: 855791 Change-Id: I964df1a781da4335e9b77192faf7913d3546de13 Reviewed-on: https://chromium-review.googlesource.com/1112817 Reviewed-by: Dirk Pranke Commit-Queue: Scott Graham --- gn.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gn.py b/gn.py index 32c2fa0b2c..cca57f95bb 100755 --- a/gn.py +++ b/gn.py @@ -19,6 +19,15 @@ import sys 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() if not bin_path: print >> sys.stderr, ('gn.py: Could not find checkout in any parent of '