Skip to content

Commit

Permalink
Fix --resources/--no-remove-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed Feb 25, 2022
1 parent 5653bc8 commit 0ce82f9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bonfire/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,16 +459,19 @@ def _get_component_items(self, component_name):
# override the tags for all occurences of an image if requested
new_items = self._sub_image_tags(new_items)

remove_all_resources = "all" in self.remove_resources or not self.remove_resources
remove_all_dependencies = "all" in self.remove_dependencies

if (
"all" not in self.no_remove_resources
and ("all" in self.remove_resources or component_name in self.remove_resources)
and (remove_all_resources or component_name in self.remove_resources)
and component_name not in self.no_remove_resources
):
_remove_resource_config(new_items)

if (
"all" not in self.no_remove_dependencies
and ("all" in self.remove_dependencies or component_name in self.remove_dependencies)
and (remove_all_dependencies or component_name in self.remove_dependencies)
and component_name not in self.no_remove_dependencies
):
_remove_dependency_config(new_items)
Expand Down

0 comments on commit 0ce82f9

Please sign in to comment.