mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
Update the subprocess calls to use the specified encoding.
This commit is contained in:
parent
9c406cd176
commit
9b129a7f03
1 changed files with 4 additions and 2 deletions
|
@ -44,10 +44,11 @@ class Linter:
|
|||
cmd = cmd.split()
|
||||
|
||||
process = subprocess.Popen(
|
||||
cmd, cwd=self.root, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||
cmd, cwd=self.root, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
encoding=self.encoding
|
||||
)
|
||||
stdout, _ = process.communicate()
|
||||
errors = stdout.decode()
|
||||
errors = stdout
|
||||
if process.returncode == 0:
|
||||
return # zero exit status
|
||||
|
||||
|
@ -140,6 +141,7 @@ class Linter:
|
|||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
encoding=self.encoding
|
||||
)
|
||||
errors = result.stdout + result.stderr
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue