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

Unified Diff: tools/gn/commands.cc

Issue 1155713006: GN: Make file/dir resolving return errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/gn/command_format.cc ('k') | tools/gn/filesystem_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/commands.cc
diff --git a/tools/gn/commands.cc b/tools/gn/commands.cc
index 556f75f721bbe4d2a5e0becf4a9dd43c9ef0b88e..ab22ebe43c8851b799c8d899404c199567781442 100644
--- a/tools/gn/commands.cc
+++ b/tools/gn/commands.cc
@@ -90,8 +90,13 @@ bool ResolveStringFromCommandLineInput(
Value(nullptr, input), &err);
if (err.has_error()) {
// Not a valid label, assume this must be a file.
+ err = Err();
file_matches->push_back(current_dir.ResolveRelativeFile(
- input, setup->build_settings().root_path_utf8()));
+ Value(nullptr, input), &err, setup->build_settings().root_path_utf8()));
+ if (err.has_error()) {
+ err.PrintToStdout();
+ return false;
+ }
return true;
}
@@ -106,7 +111,11 @@ bool ResolveStringFromCommandLineInput(
} else {
// Not an item, assume this must be a file.
file_matches->push_back(current_dir.ResolveRelativeFile(
- input, setup->build_settings().root_path_utf8()));
+ Value(nullptr, input), &err, setup->build_settings().root_path_utf8()));
+ if (err.has_error()) {
+ err.PrintToStdout();
+ return false;
+ }
}
return true;
« no previous file with comments | « tools/gn/command_format.cc ('k') | tools/gn/filesystem_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698