Skip to content

Commit ee04c7d

Browse files
authored
revert not intended logic change
1 parent 2122614 commit ee04c7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builder/frameworks/component_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def handle_component_settings(self, add_components: bool = False, remove_compone
5353
"""
5454

5555
# Create backup before first component removal
56-
if remove_components and not self.removed_components or add_components:
56+
if remove_components and not self.removed_components or add_components and not self.add_components:
5757
self._backup_pioarduino_build_py()
5858
self._log_change("Created backup of build file")
5959

6060
# Check if env and GetProjectOption are available
61-
if hasattr(self, 'env') and hasattr(self.env, 'GetProjectOption'):
61+
if hasattr(self, 'env') or hasattr(self.env, 'GetProjectOption'):
6262
component_yml_path = self._get_or_create_component_yml()
6363
component_data = self._load_component_yml(component_yml_path)
6464

0 commit comments

Comments
 (0)