Skip to content

Commit

Permalink
remove --oldinstallonly: when no old installonly packages, exit with 0
Browse files Browse the repository at this point in the history
If no old installonly packages are present, then the command succesfully
removed all of them and should exit with 0 and write the message to
stdout instead of stderr.
  • Loading branch information
pkratoch authored and m-blaha committed Apr 8, 2024
1 parent 720338f commit 87eb5a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dnf/cli/commands/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ def run(self):
for pkg in instonly:
self.base.package_remove(pkg)
else:
raise dnf.exceptions.Error(
_('No old installonly packages found for removal.'))
logger.info(_('No old installonly packages found for removal.'))
return

# Remove groups.
Expand Down

0 comments on commit 87eb5a7

Please sign in to comment.