🔨 Detect feature parsing error (#24824)

This commit is contained in:
ellensp 2022-10-02 05:35:47 +13:00 committed by Scott Lahteine
parent 74435b0dcb
commit 5c68d26d4e

View File

@ -60,10 +60,10 @@ if pioutil.is_pio_build():
raise SystemExit("Error: Marlin requires PlatformIO >= 6.1.1. Use 'pio upgrade' to get a newer version.") raise SystemExit("Error: Marlin requires PlatformIO >= 6.1.1. Use 'pio upgrade' to get a newer version.")
if 'MARLIN_FEATURES' not in env: 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']: if len(env['MARLIN_FEATURES']) == 0:
raise SystemExit("Error: MOTHERBOARD is not defined in Configuration.h") raise SystemExit("Error: Failed to parse Marlin features. See previous error messages.")
build_env = env['PIOENV'] build_env = env['PIOENV']
motherboard = env['MARLIN_FEATURES']['MOTHERBOARD'] motherboard = env['MARLIN_FEATURES']['MOTHERBOARD']