File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -297,6 +297,12 @@ def check_config():
297
297
else :
298
298
cli_config = json .loads (output )
299
299
if cli_config is not None :
300
+ # Since arduino-cli 1.x new level "config"
301
+ if not arduino_cli_ver .startswith ("0." ):
302
+ print (cli_config )
303
+ cli_config_tmp = cli_config ["config" ]
304
+ cli_config = cli_config_tmp
305
+ print (cli_config )
300
306
if cli_config ["directories" ]["data" ] is not None :
301
307
sketches_path_list .append (Path (cli_config ["directories" ]["data" ]))
302
308
else :
@@ -526,7 +532,12 @@ def find_board():
526
532
print (e .stdout .decode ("utf-8" ))
527
533
quit (e .returncode )
528
534
else :
529
- fqbn_list_tmp = [board ["fqbn" ] for board in json .loads (output )]
535
+ boards = json .loads (output )
536
+ # Since arduino-cli 1.x new level "boards" and is a dict
537
+ if not arduino_cli_ver .startswith ("0." ):
538
+ print (boards )
539
+ boards = boards ["boards" ]
540
+ fqbn_list_tmp = [board ["fqbn" ] for board in boards ]
530
541
if not len (fqbn_list_tmp ):
531
542
print (f"No boards found for { arduino_platform } " )
532
543
quit (1 )
You can’t perform that action at this time.
0 commit comments