Skip to content

Commit 5c68d26

Browse files
ellenspthinkyhead
authored andcommitted
🔨 Detect feature parsing error (MarlinFirmware#24824)
1 parent 74435b0 commit 5c68d26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

buildroot/share/PlatformIO/scripts/preflight-checks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ def sanity_check_target():
6060
raise SystemExit("Error: Marlin requires PlatformIO >= 6.1.1. Use 'pio upgrade' to get a newer version.")
6161

6262
if 'MARLIN_FEATURES' not in env:
63-
raise SystemExit("Error: this script should be used after common Marlin scripts")
63+
raise SystemExit("Error: this script should be used after common Marlin scripts.")
6464

65-
if 'MOTHERBOARD' not in env['MARLIN_FEATURES']:
66-
raise SystemExit("Error: MOTHERBOARD is not defined in Configuration.h")
65+
if len(env['MARLIN_FEATURES']) == 0:
66+
raise SystemExit("Error: Failed to parse Marlin features. See previous error messages.")
6767

6868
build_env = env['PIOENV']
6969
motherboard = env['MARLIN_FEATURES']['MOTHERBOARD']

0 commit comments

Comments
 (0)