diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-11 19:28:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-11 19:31:37 -0700 |
commit | ac8acc7b05774ac5777d5a03311728fb14d3f217 (patch) | |
tree | ae5d921ede8aed3332e282a9297f84ce06f7f7e1 /029tools.cc | |
parent | 1156971774b307bec29fab34a523eb39a7904174 (diff) | |
download | mu-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.cc | 5 |
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") |