Skip to content

Commit d2626bf

Browse files
authored
Clean environment build folder before Arduino build (#344)
Added cleanup of the environment build folder before the Arduino build process.
1 parent ef31ae1 commit d2626bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builder/frameworks/espidf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,9 @@ def _replace_move(src, dst):
26322632
shutil.copyfile(str(Path(env.subst("$PROJECT_DIR")) / ("sdkconfig." + env["PIOENV"])), str(Path(arduino_libs) / chip_variant / "sdkconfig"))
26332633
shutil.copyfile(str(Path(env.subst("$PROJECT_DIR")) / ("sdkconfig." + env["PIOENV"])), str(Path(arduino_libs) / "sdkconfig"))
26342634
try:
2635+
# clean env build folder to avoid issues with following Arduino build
2636+
shutil.rmtree(env_build)
2637+
Path(env_build).mkdir(parents=True, exist_ok=True)
26352638
os.remove(str(Path(env.subst("$PROJECT_DIR")) / "dependencies.lock"))
26362639
os.remove(str(Path(env.subst("$PROJECT_DIR")) / "CMakeLists.txt"))
26372640
except FileNotFoundError:

0 commit comments

Comments
 (0)