fix: lint command with nested spaced strings

This commit is contained in:
Aaron Weisberg 2024-12-29 21:45:25 +01:00
parent f292e01980
commit acf654c984
3 changed files with 10 additions and 13 deletions

View file

@ -39,7 +39,7 @@ def get_windows_parent_process_name():
return None
def run_cmd_subprocess(command, verbose=False, cwd=None):
def run_cmd_subprocess(command, verbose=False, cwd=None, encoding=sys.stdout.encoding):
if verbose:
print("Using run_cmd_subprocess:", command)
@ -65,7 +65,7 @@ def run_cmd_subprocess(command, verbose=False, cwd=None):
stderr=subprocess.STDOUT,
text=True,
shell=True,
encoding=sys.stdout.encoding,
encoding=encoding,
errors="replace",
bufsize=0, # Set bufsize to 0 for unbuffered output
universal_newlines=True,