diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 20:12:38 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 20:12:38 -0500 |
commit | be1cc09981d24c94a07f08c615e66e3a261294af (patch) | |
tree | 69b462440624e5ff28a42dd1842932c8fc01cd63 | |
parent | aadb2d19ee5bfabf4cbe5ddd37369a14f572dda1 (diff) | |
download | horizon-be1cc09981d24c94a07f08c615e66e3a261294af.tar.gz horizon-be1cc09981d24c94a07f08c615e66e3a261294af.tar.bz2 horizon-be1cc09981d24c94a07f08c615e66e3a261294af.tar.xz horizon-be1cc09981d24c94a07f08c615e66e3a261294af.zip |
hscript: Simplify MISSING_ERROR usage
-rw-r--r-- | hscript/script.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hscript/script.cc b/hscript/script.cc index c282f41..5ff7cb2 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -239,24 +239,24 @@ const Script *Script::load(std::istream &sstream, const ScriptOptions opts) { /* Ensure all required keys are present. */ #define MISSING_ERROR(key) \ output_error("installfile:" + std::to_string(lineno),\ - "expected value for key '" + key + "'",\ + "expected value for key '" + std::string(key) + "'",\ "this key is required", (opts.test(Pretty)));\ errors++; if(!the_script->internal->network) { - MISSING_ERROR(std::string("network")) + MISSING_ERROR("network") } if(!the_script->internal->hostname) { - MISSING_ERROR(std::string("hostname")) + MISSING_ERROR("hostname") } if(the_script->internal->packages.size() == 0) { - MISSING_ERROR(std::string("pkginstall")) + MISSING_ERROR("pkginstall") } if(!the_script->internal->rootpw) { - MISSING_ERROR(std::string("rootpw")) + MISSING_ERROR("rootpw") } if(the_script->internal->mounts.size() == 0) { - MISSING_ERROR(std::string("mount")) + MISSING_ERROR("mount") } #undef MISSING_ERROR |