From bf4822a17eed8bdaf9d337caf806c63c82b06a89 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 18 Jul 2017 13:36:04 +0300 Subject: Make buildtab target to be non-optional --- libbbot/manifest.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbbot/manifest.cxx') diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index dae6e3e..8a2ebaa 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -517,7 +517,7 @@ namespace bbot } else if (n == "target") { - if (target) + if (!target.empty ()) bad_name ("task target redefinition"); try @@ -566,6 +566,9 @@ namespace bbot if (machine.empty ()) bad_value ("no task machine specified"); + + if (target.empty ()) + bad_value ("no task target specified"); } void task_manifest:: @@ -583,9 +586,7 @@ namespace bbot s.next ("trust", v); s.next ("machine", machine); - - if (target) - s.next ("target", target->string ()); + s.next ("target", target.string ()); // Serialize an optional value of the strings type as a space-separated // string list. -- cgit v1.1