mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
style: reorder subprocess args to keep cwd consistent
This commit is contained in:
parent
1a745e4fa9
commit
415652d38e
1 changed files with 2 additions and 2 deletions
|
@ -49,11 +49,11 @@ class Linter:
|
||||||
try:
|
try:
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
cmd,
|
cmd,
|
||||||
cwd=self.root,
|
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
encoding=self.encoding,
|
encoding=self.encoding,
|
||||||
errors="replace",
|
errors="replace",
|
||||||
|
cwd=self.root,
|
||||||
)
|
)
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
print(f"Unable to execute lint command: {err}")
|
print(f"Unable to execute lint command: {err}")
|
||||||
|
@ -152,12 +152,12 @@ class Linter:
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
flake8_cmd,
|
flake8_cmd,
|
||||||
cwd=self.root,
|
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
check=False,
|
check=False,
|
||||||
encoding=self.encoding,
|
encoding=self.encoding,
|
||||||
errors="replace",
|
errors="replace",
|
||||||
|
cwd=self.root,
|
||||||
)
|
)
|
||||||
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