Bug #22675
open"hammer proxy import-classes" exits silently even if something went wrong
Description
If an environment directory is no longer present in /etc/puppetlabs/code/environments/ but it's still associated to a host or a hostgroup, the command in the subject exits successfully importing new environment directories but failing to remove the deleted ones. The output should at least say that it tried to remove the deleted environments and that it failed because it was still in use.
Futhermore, the subcommand "import-classes" should be renamed to something more adequate to reflect the actual action taken (adding new environments and deleting removed ones)... something like "refresh-classes/environments". This would make it more obvious for people looking for this functionality. I only found out today how to refresh/sync environments by asking on #theforeman IRC channel and even more experienced users/developers agreed on this one. Maybe this second part should be filed as another refactor issue.
Files
No data to display