There was an error while loading. Please reload this page.
1 parent 17a7293 commit 32d501bCopy full SHA for 32d501b
platformio/builder/tools/piobuild.py
@@ -292,7 +292,10 @@ def CollectBuildFiles(
292
for callback, pattern in middlewares:
293
if pattern and not fnmatch.fnmatch(node.srcnode().get_path(), pattern):
294
continue
295
- new_node = callback(new_node)
+ if callback.__code__.co_argcount == 2:
296
+ new_node = callback(env, new_node)
297
+ else:
298
+ new_node = callback(new_node)
299
if new_node:
300
new_sources.append(new_node)
301
0 commit comments