Skip to content

Commit

Permalink
🔨 Detect feature parsing error (MarlinFirmware#24824)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and thinkyhead committed Dec 16, 2022
1 parent 74435b0 commit 5c68d26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buildroot/share/PlatformIO/scripts/preflight-checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def sanity_check_target():
raise SystemExit("Error: Marlin requires PlatformIO >= 6.1.1. Use 'pio upgrade' to get a newer version.")

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

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

build_env = env['PIOENV']
motherboard = env['MARLIN_FEATURES']['MOTHERBOARD']
Expand Down

0 comments on commit 5c68d26

Please sign in to comment.