scripts: ci: check_compliance: ruff: avoid mixing stdout and stderr
The python subprocess call had a stdout=subprocess.PIPE parameter that redirects standard output to a pipe, and a stderr=subprocess.STDOUT parameter that redirected stderr to the pipe. This mixed JSON and non-JSON output together, and issued an exception. Fixing with stderr=subprocess.DEVNULL to ignore standard error and only keep the JSON output. Signed-off-by: Josuah Demangeon <me@josuah.net>
This commit is contained in:
parent
c6cf9b9e8b
commit
d6b8912ad9
1 changed files with 1 additions and 1 deletions
|
@ -1657,7 +1657,7 @@ class Ruff(ComplianceTest):
|
||||||
f"ruff check --force-exclude --output-format=json {file}",
|
f"ruff check --force-exclude --output-format=json {file}",
|
||||||
check=True,
|
check=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.DEVNULL,
|
||||||
shell=True,
|
shell=True,
|
||||||
cwd=GIT_TOP,
|
cwd=GIT_TOP,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue