@@ -231,10 +231,13 @@ def main() -> None:
231
231
232
232
args = parser .parse_args ()
233
233
234
- # Set the options in the app
235
- if args .target .strip () == "default" :
234
+ # Force targets to be lower case
235
+ args .target = args .target .lower ()
236
+
237
+ # Check if the target is valid
238
+ if args .target == "default" :
236
239
args .target = "," .join ([x [0 ] for x in target_choices if x [1 ]])
237
- elif args .target . strip () == "all" :
240
+ elif args .target == "all" :
238
241
args .target = "," .join ([x [0 ] for x in target_choices ])
239
242
240
243
app .supported_targets = [x [0 ] for x in target_choices ]
@@ -246,6 +249,7 @@ def main() -> None:
246
249
247
250
app .setting_target = args .target
248
251
252
+ # Check if the Arduino path is valid
249
253
if args .copy :
250
254
if check_arduino_path (args .arduino_path ):
251
255
app .setting_enable_copy = True
@@ -258,6 +262,7 @@ def main() -> None:
258
262
else :
259
263
app .setting_enable_copy = False
260
264
265
+ # Set the other options
261
266
app .setting_arduino_path = os .path .abspath (args .arduino_path )
262
267
app .setting_arduino_branch = args .arduino_branch
263
268
app .setting_idf_branch = args .idf_branch
0 commit comments