Skip to content

Commit 70c2707

Browse files
committed
simplify logic
1 parent 57ab648 commit 70c2707

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang_tools/install.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,6 @@ def install_clang_tools(version: str, directory: str, overwrite: bool) -> None:
149149
f"directory is not in your environment variable PATH.{RESET_COLOR}",
150150
)
151151
for tool_name in ("clang-format", "clang-tidy"):
152-
target_downloaded = install_tool(tool_name, version, install_dir)
153-
if target_downloaded or (not target_downloaded and overwrite):
154-
create_sym_link(tool_name, version, install_dir, overwrite)
152+
install_tool(tool_name, version, install_dir)
153+
# `install_tool()` guarantees that the binary exists now
154+
create_sym_link(tool_name, version, install_dir, overwrite)

0 commit comments

Comments
 (0)