From ec6bf192338fa961b9293d95a437d3399abeac70 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Wed, 22 May 2024 17:22:03 +0200 Subject: [PATCH] - fixed error message --- client/cmd-cleanup.cc | 6 ++++-- package/snapper.changes | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/cmd-cleanup.cc b/client/cmd-cleanup.cc index cf5f0b08..f00d16e8 100644 --- a/client/cmd-cleanup.cc +++ b/client/cmd-cleanup.cc @@ -265,9 +265,11 @@ namespace snapper SN_THROW(OptionsException(_("Command 'cleanup' needs one arguments."))); } - if (!toValue(get_opts.pop_arg(), cleanup_algorithm, false)) + const char* arg = get_opts.pop_arg(); + + if (!toValue(arg, cleanup_algorithm, false)) { - string error = sformat(_("Unknown cleanup algorithm '%s'."), opt->second.c_str()) + '\n' + + string error = sformat(_("Unknown cleanup algorithm '%s'."), arg) + '\n' + possible_enum_values(); SN_THROW(OptionsException(error)); } diff --git a/package/snapper.changes b/package/snapper.changes index ef27fd94..d2590aa0 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 22 17:21:18 CEST 2024 - aschnell@suse.com + +- fixed error message (gh#openSUSE/snapper#907) + ------------------------------------------------------------------- Thu Apr 18 15:03:31 CEST 2024 - aschnell@suse.com -- 2.47.3