Skip to content

Commit 011addb

Browse files
committed
[CI] Fix stderr output
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent cfc2de7 commit 011addb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

CI/build/arduino-cli.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ def check_config():
198198

199199
try:
200200
output = subprocess.check_output(
201-
[arduino_cli, "version"], stderr=subprocess.DEVNULL,
201+
[arduino_cli, "version"], stderr=subprocess.STDOUT,
202202
)
203203
except subprocess.CalledProcessError as e:
204204
print('"' + " ".join(e.cmd) + '" failed with code: {}!'.format(e.returncode))
205-
print(e.stdout)
205+
print(e.stdout.decode("utf-8"))
206206
quit(e.returncode)
207207
else:
208208
res = re.match(r".*Version:\s+(\d+\.\d+\.\d+).*", output.decode("utf-8"))
@@ -218,11 +218,11 @@ def check_config():
218218
try:
219219
output = subprocess.check_output(
220220
[arduino_cli, "core", "search", "stm32", "--additional-urls", stm32_url],
221-
stderr=subprocess.DEVNULL,
221+
stderr=subprocess.STDOUT,
222222
)
223223
except subprocess.CalledProcessError as e:
224224
print('"' + " ".join(e.cmd) + '" failed with code: {}!'.format(e.returncode))
225-
print(e.stdout)
225+
print(e.stdout.decode("utf-8"))
226226
quit(e.returncode)
227227
else:
228228
if arduino_platform not in output.decode("utf-8"):
@@ -232,13 +232,13 @@ def check_config():
232232
try:
233233
output = subprocess.check_output(
234234
[arduino_cli, "config", "dump", "--format", "json"],
235-
stderr=subprocess.DEVNULL,
235+
stderr=subprocess.STDOUT,
236236
).decode("utf-8")
237237
except subprocess.CalledProcessError as e:
238238
print(
239239
'"' + " ".join(e.cmd) + '" failed with code: {}!'.format(e.returncode)
240240
)
241-
print(e.stdout)
241+
print(e.stdout.decode("utf-8"))
242242
quit(e.returncode)
243243
else:
244244
cli_config = json.loads(output)
@@ -465,7 +465,7 @@ def find_board():
465465
).decode("utf-8")
466466
except subprocess.CalledProcessError as e:
467467
print('"' + " ".join(e.cmd) + '" failed with code: {}!'.format(e.returncode))
468-
print(e.stdout)
468+
print(e.stdout.decode("utf-8"))
469469
quit(e.returncode)
470470
else:
471471
boards_list = json.loads(output)
@@ -488,7 +488,7 @@ def find_board():
488488
print(
489489
'"' + " ".join(e.cmd) + '" failed with code: {}!'.format(e.returncode)
490490
)
491-
print(e.stdout)
491+
print(e.stdout.decode("utf-8"))
492492
quit(e.returncode)
493493
else:
494494
board_detail = json.loads(output)

0 commit comments

Comments
 (0)