Skip to content

Commit 554ac53

Browse files
committed
fix: support uninstall all clang-tools
1 parent 7d78b27 commit 554ac53

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang_tools/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def uninstall_tool(tool_name: str, version: str, directory: str):
234234
symlink.unlink()
235235

236236

237-
def uninstall_clang_tools(version: str, directory: str):
237+
def uninstall_clang_tools(version: str, tools: str, directory: str):
238238
"""Uninstall a clang tool of a given version.
239239
240240
:param version: The version of the clang-tools to remove.
@@ -243,7 +243,7 @@ def uninstall_clang_tools(version: str, directory: str):
243243
"""
244244
install_dir = install_dir_name(directory)
245245
print(f"Uninstalling version {version} from {str(install_dir)}")
246-
for tool in ("clang-format", "clang-tidy"):
246+
for tool in tools:
247247
uninstall_tool(tool, version, install_dir)
248248

249249

clang_tools/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def main():
6868
args = parser.parse_args()
6969

7070
if args.uninstall:
71-
uninstall_clang_tools(args.uninstall, args.directory)
71+
uninstall_clang_tools(args.uninstall, args.tool, args.directory)
7272
elif args.install:
7373
version = Version(args.install)
7474
if version.info != (0, 0, 0):

0 commit comments

Comments
 (0)