🔨 More specific preprocess exception (#28256)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
ellensp
2026-01-08 17:20:53 +13:00
committed by GitHub
parent e61469f8c1
commit 65b62a900f
@@ -37,15 +37,20 @@ def run_preprocessor(env, fn=None):
else:
cmd += ['-D' + s]
cmd += ['-D__MARLIN_DEPS__ -w -dM -E -x c++']
depcmd = cmd + [ filename ]
cmd = ' '.join(depcmd)
cmd += ['-D__MARLIN_DEPS__ -w -dM -E -x c++', filename]
cmd = ' '.join(cmd)
blab(cmd)
try:
define_list = subprocess.check_output(cmd, shell=True).splitlines()
define_list_text = subprocess.check_output(cmd, shell=True)
except:
define_list = {}
raise RuntimeError(f"Command `{cmd}` failed during build pre-processing.")
define_list = define_list_text.splitlines() if define_list_text else []
preprocessor_cache[filename] = define_list
return define_list