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

Unified Diff: tools/gn/functions.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/function_write_file.cc ('k') | tools/gn/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/functions.cc
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc
index b7e133550b8e5b4a0ff50b4a3e31947a53846b8d..c99075ae25cdaef82c5d704e0c72e6d28d90a688 100644
--- a/tools/gn/functions.cc
+++ b/tools/gn/functions.cc
@@ -491,10 +491,12 @@ Value RunImport(Scope* scope,
const SourceDir& input_dir = scope->GetSourceDir();
SourceFile import_file =
- input_dir.ResolveRelativeFile(args[0].string_value(),
+ input_dir.ResolveRelativeFile(args[0], err,
scope->settings()->build_settings()->root_path_utf8());
- scope->settings()->import_manager().DoImport(import_file, function,
- scope, err);
+ if (!err->has_error()) {
+ scope->settings()->import_manager().DoImport(import_file, function,
+ scope, err);
+ }
return Value();
}
« no previous file with comments | « tools/gn/function_write_file.cc ('k') | tools/gn/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698