Skip to content

Commit e24aa3a

Browse files
committed
fix: suppress output
1 parent 6e12622 commit e24aa3a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp_linter_hooks/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ def parse_version(v: str):
143143

144144

145145
def _install_tool(tool: str, version: str) -> Optional[Path]:
146-
"""Install a tool using pip."""
146+
"""Install a tool using pip, suppressing output."""
147147
try:
148148
subprocess.check_call(
149-
[sys.executable, "-m", "pip", "install", f"{tool}=={version}"]
149+
[sys.executable, "-m", "pip", "install", f"{tool}=={version}"],
150+
stdout=subprocess.DEVNULL,
151+
stderr=subprocess.DEVNULL,
150152
)
151153
return shutil.which(tool)
152154
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)