Skip to content

Commit bd0873f

Browse files
Marek Fialaespressif-bot
authored andcommitted
fix(tools): idf_tools.py uninstall decide based on preferred tool version
idf_tools.py uninstall now doesn't take only recommended version, but makes the decision based on preferred installed versions.
1 parent 335ba6b commit bd0873f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/idf_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3150,7 +3150,7 @@ def action_uninstall(args: Any) -> None:
31503150
os.listdir(os.path.join(tools_path, tool)) if os.path.isdir(os.path.join(tools_path, tool)) else []
31513151
)
31523152
try:
3153-
unused_versions = [x for x in tool_versions if x != tools_info[tool].get_recommended_version()]
3153+
unused_versions = [x for x in tool_versions if x != tools_info[tool].get_preferred_installed_version()]
31543154
except (
31553155
KeyError
31563156
): # When tool that is not supported by tools_info (tools.json) anymore, remove the whole tool file
@@ -3206,7 +3206,7 @@ def action_uninstall(args: Any) -> None:
32063206
tool_name, tool_version = tool_spec.split('@', 1)
32073207
tool_obj = tools_info_for_platform[tool_name]
32083208
if tool_version is None:
3209-
tool_version = tool_obj.get_recommended_version()
3209+
tool_version = tool_obj.get_preferred_installed_version()
32103210
# mypy-checks
32113211
if tool_version is not None:
32123212
archive_version = tool_obj.versions[tool_version].get_download_for_platform(CURRENT_PLATFORM)

0 commit comments

Comments
 (0)