Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dbc7063

Browse filesBrowse files
committed
fix(arduino-cli): support 1.x version
Some data format have changed. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent e194ab8 commit dbc7063
Copy full SHA for dbc7063

File tree

1 file changed

+8
-1
lines changed
Filter options

1 file changed

+8
-1
lines changed

‎CI/build/arduino-cli.py

Copy file name to clipboardExpand all lines: CI/build/arduino-cli.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ def check_config():
297297
else:
298298
cli_config = json.loads(output)
299299
if cli_config is not None:
300+
# Since arduino-cli 1.x new level "config"
301+
if "config" in cli_config.keys():
302+
cli_config = cli_config["config"]
300303
if cli_config["directories"]["data"] is not None:
301304
sketches_path_list.append(Path(cli_config["directories"]["data"]))
302305
else:
@@ -526,7 +529,11 @@ def find_board():
526529
print(e.stdout.decode("utf-8"))
527530
quit(e.returncode)
528531
else:
529-
fqbn_list_tmp = [board["fqbn"] for board in json.loads(output)]
532+
boards = json.loads(output)
533+
# Since arduino-cli 1.x new level "boards" and is a dict
534+
if type(boards) is dict:
535+
boards = boards["boards"]
536+
fqbn_list_tmp = [board["fqbn"] for board in boards]
530537
if not len(fqbn_list_tmp):
531538
print(f"No boards found for {arduino_platform}")
532539
quit(1)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.