summaryrefslogtreecommitdiff
path: root/hscript/script.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-08 20:12:38 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-08 20:12:38 -0500
commitbe1cc09981d24c94a07f08c615e66e3a261294af (patch)
tree69b462440624e5ff28a42dd1842932c8fc01cd63 /hscript/script.cc
parentaadb2d19ee5bfabf4cbe5ddd37369a14f572dda1 (diff)
downloadhorizon-be1cc09981d24c94a07f08c615e66e3a261294af.tar.gz
horizon-be1cc09981d24c94a07f08c615e66e3a261294af.tar.bz2
horizon-be1cc09981d24c94a07f08c615e66e3a261294af.tar.xz
horizon-be1cc09981d24c94a07f08c615e66e3a261294af.zip
hscript: Simplify MISSING_ERROR usage
Diffstat (limited to 'hscript/script.cc')
-rw-r--r--hscript/script.cc12
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