mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25: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()
|
cmd = cmd.split()
|
||||||
|
|
||||||
process = subprocess.Popen(
|
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()
|
stdout, _ = process.communicate()
|
||||||
errors = stdout.decode()
|
errors = stdout
|
||||||
if process.returncode == 0:
|
if process.returncode == 0:
|
||||||
return # zero exit status
|
return # zero exit status
|
||||||
|
|
||||||
|
@ -140,6 +141,7 @@ class Linter:
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
check=False,
|
check=False,
|
||||||
|
encoding=self.encoding
|
||||||
)
|
)
|
||||||
errors = result.stdout + result.stderr
|
errors = result.stdout + result.stderr
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue