Skip to content

Commit ce41d4f

Browse files
authored
Use PIPE instead of capture_output to support python3.6 (#36)
1 parent aeee5f6 commit ce41d4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang_tools/install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import shutil
1111
import subprocess
1212
import sys
13-
from typing import Optional, Union
13+
from typing import Optional
1414

1515
from . import install_os, RESET_COLOR, suffix, YELLOW
1616
from .util import download_file, verify_sha512, get_sha_checksum
@@ -38,7 +38,7 @@ def is_installed(tool_name: str, version: str) -> Optional[Path]:
3838
)
3939
try:
4040
result = subprocess.run(
41-
[exe_name, "--version"], capture_output=True, check=True
41+
[exe_name, "--version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True
4242
)
4343
except (FileNotFoundError, subprocess.CalledProcessError):
4444
return None # tool is not installed

0 commit comments

Comments
 (0)