about summary refs log tree commit diff stats
path: root/029tools.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-11 19:28:29 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-11 19:31:37 -0700
commitac8acc7b05774ac5777d5a03311728fb14d3f217 (patch)
treeae5d921ede8aed3332e282a9297f84ce06f7f7e1 /029tools.cc
parent1156971774b307bec29fab34a523eb39a7904174 (diff)
downloadmu-ac8acc7b05774ac5777d5a03311728fb14d3f217.tar.gz
2954 - bugfix: $system
The actual fix is in the layer rewriting literal strings.
Diffstat (limited to '029tools.cc')
-rw-r--r--029tools.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/029tools.cc b/029tools.cc
index faab1eb0..364c6260 100644
--- a/029tools.cc
+++ b/029tools.cc
@@ -273,9 +273,12 @@ put(Recipe_ordinal, "$system", _SYSTEM);
 :(before "End Primitive Recipe Checks")
 case _SYSTEM: {
   if (SIZE(inst.ingredients) != 1) {
-    raise << maybe(get(Recipe, r).name) << "'$system' requires exactly one ingredient, but got none\n" << end();
+    raise << maybe(get(Recipe, r).name) << "'$system' requires exactly one ingredient, but got " << to_string(inst) << '\n' << end();
     break;
   }
+  if (!is_literal_string(inst.ingredients.at(0))) {
+    raise << maybe(get(Recipe, r).name) << "ingredient to '$system' must be a literal text, but got " << to_string(inst) << '\n' << end();
+  }
   break;
 }
 :(before "End Primitive Recipe Implementations")