Skip to content

Commit

Permalink
Merge pull request #908 from aschnell/master
Browse files Browse the repository at this point in the history
- fixed error message
  • Loading branch information
aschnell authored May 22, 2024
2 parents d174726 + ec6bf19 commit 96f0b67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/cmd-cleanup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<CleanupAlgorithm>();
SN_THROW(OptionsException(error));
}
Expand Down
5 changes: 5 additions & 0 deletions package/snapper.changes
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 96f0b67

Please sign in to comment.