diff options
Diffstat (limited to 'init/import_parser.cpp')
-rw-r--r-- | init/import_parser.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/init/import_parser.cpp b/init/import_parser.cpp index c72b7d65e..1a43508d7 100644 --- a/init/import_parser.cpp +++ b/init/import_parser.cpp @@ -29,15 +29,14 @@ Result<void> ImportParser::ParseSection(std::vector<std::string>&& args, return Error() << "single argument needed for import\n"; } - std::string conf_file; - bool ret = expand_props(args[1], &conf_file); - if (!ret) { - return Error() << "error while expanding import"; + auto conf_file = ExpandProps(args[1]); + if (!conf_file) { + return Error() << "Could not expand import: " << conf_file.error(); } - LOG(INFO) << "Added '" << conf_file << "' to import list"; + LOG(INFO) << "Added '" << *conf_file << "' to import list"; if (filename_.empty()) filename_ = filename; - imports_.emplace_back(std::move(conf_file), line); + imports_.emplace_back(std::move(*conf_file), line); return {}; } |