Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: tools/cr/cr/targets/target.py

Issue 136553002: cr: Print a list of closest matching targets when no match is found (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cr/cr/actions/builder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cr/cr/targets/target.py
diff --git a/tools/cr/cr/targets/target.py b/tools/cr/cr/targets/target.py
index e02bdb04ec2ff959a15840422d9ac70da6a201ac..0780ae936c304f202b3e978882570cc5cc306aa2 100644
--- a/tools/cr/cr/targets/target.py
+++ b/tools/cr/cr/targets/target.py
@@ -117,6 +117,11 @@ class Target(cr.Config, cr.AutoExport):
if not target.valid:
print 'Invalid target {0} as {1}'.format(
target_name, target.build_target)
+ guesses = cr.Builder.GuessTargets(context, target_name)
+ if guesses:
+ print 'Did you mean {0}?'.format(
+ ', '.join(guesses[:-1]) + ' or ' + guesses[-1]
+ if len(guesses) > 1 else guesses[0])
exit(1)
return target
print 'Unknown target {0}'.format(target_name)
« no previous file with comments | « tools/cr/cr/actions/builder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698