diff options
Diffstat (limited to 'src/zen/cmds/service_cmd.cpp')
| -rw-r--r-- | src/zen/cmds/service_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zen/cmds/service_cmd.cpp b/src/zen/cmds/service_cmd.cpp index 37baf5483..c43c4e614 100644 --- a/src/zen/cmds/service_cmd.cpp +++ b/src/zen/cmds/service_cmd.cpp @@ -320,7 +320,7 @@ ServiceCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) throw OptionParseException("'verb' option is required", m_Options.help()); } - // Parse subcommand permissively — forward unrecognised options to the parent parser. + // Parse subcommand permissively - forward unrecognised options to the parent parser. std::vector<std::string> SubUnmatched; if (!ParseOptionsPermissive(*SubOption, gsl::narrow<int>(SubCommandArguments.size()), SubCommandArguments.data(), SubUnmatched)) { @@ -500,9 +500,9 @@ ServiceCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) { std::filesystem::path Destination = m_InstallPath / File.filename(); - if (!CopyFile(File, Destination, {.EnableClone = false})) + if (std::error_code CopyEc = CopyFile(File, Destination, {.EnableClone = false}); CopyEc) { - throw std::runtime_error(fmt::format("Failed to copy '{}' to '{}'", File, Destination)); + throw std::system_error(CopyEc, fmt::format("Failed to copy '{}' to '{}'", File, Destination)); } ZEN_INFO("Copied '{}' to '{}'", File, Destination); |