Commit d22a2ab7 authored by brettw@chromium.org's avatar brettw@chromium.org

Add an error for empty script names in GN.

I accidentally passed an empty string here and got a weird error processing the path.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/292123012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272573 0039d316-1c4b-4281-b951-d872f2087c98
parent a9226f17
......@@ -94,8 +94,13 @@ void ActionTargetGenerator::FillScript() {
if (!value->VerifyTypeIs(Value::STRING, err_))
return;
target_->action_values().set_script(
scope_->GetSourceDir().ResolveRelativeFile(value->string_value()));
SourceFile script_file =
scope_->GetSourceDir().ResolveRelativeFile(value->string_value());
if (script_file.value().empty()) {
*err_ = Err(*value, "script name is empty");
return;
}
target_->action_values().set_script(script_file);
}
void ActionTargetGenerator::FillScriptArgs() {
......
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