Skip to content

Commit e374158

Browse files
authored
Add smart_include_length_shorten to build middlewares
Ensure smart_include_length_shorten is added to build middlewares on Windows.
1 parent f33de21 commit e374158

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builder/frameworks/arduino.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,9 @@ def get_frameworks_in_current_env():
936936
env.AddPostAction("checkprogsize", silent_action)
937937

938938
if IS_WINDOWS:
939-
env.AddBuildMiddleware(smart_include_length_shorten)
939+
if not env.get("__PIO_BUILD_MIDDLEWARES"):
940+
env["__PIO_BUILD_MIDDLEWARES"] = []
941+
env["__PIO_BUILD_MIDDLEWARES"].append(env.AddBuildMiddleware(smart_include_length_shorten))
940942

941943
build_script_path = str(Path(FRAMEWORK_DIR) / "tools" / "pioarduino-build.py")
942944
SConscript(build_script_path)

0 commit comments

Comments
 (0)