diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-02 22:18:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-02 22:18:19 -0700 |
commit | cfb142b9601cc648f15bf5738a3df09a23835e41 (patch) | |
tree | 670f168fbbf2693b17d679939bd1c203de1c3837 /029tools.cc | |
parent | 37900254f083364dcfbb80cf7119c230a0b603d6 (diff) | |
download | mu-cfb142b9601cc648f15bf5738a3df09a23835e41.tar.gz |
1923
Still iterating on the right way to handle incorrect number of ingredients. My first idea of creating null results doesn't really work once they're used in later instructions. Just add a warning at one place in the run loop, but otherwise only add products when there's something to save in them. Undoes some work around commit 1886.
Diffstat (limited to '029tools.cc')
-rw-r--r-- | 029tools.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/029tools.cc b/029tools.cc index de4b488c..11130e5f 100644 --- a/029tools.cc +++ b/029tools.cc @@ -189,12 +189,12 @@ _SYSTEM, Recipe_ordinal["$system"] = _SYSTEM; :(before "End Primitive Recipe Implementations") case _SYSTEM: { - products.resize(1); if (current_instruction().ingredients.empty()) { raise << current_recipe_name() << ": '$system' requires exactly one ingredient, but got none\n" << end(); break; } int status = system(current_instruction().ingredients.at(0).name.c_str()); + products.resize(1); products.at(0).push_back(status); break; } |