From ef3c061ecf7b830f0aaed4779c945c11065c7e1a Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:00:00 +0100 Subject: [PATCH] fix github actions copy error in some cases the folder already exists. Do not abort copy. --- pio-tools/post_esp32.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pio-tools/post_esp32.py b/pio-tools/post_esp32.py index b662f9223..5fe75bf2b 100644 --- a/pio-tools/post_esp32.py +++ b/pio-tools/post_esp32.py @@ -54,19 +54,19 @@ build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectO if ("CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags) and flag_custom_sdkconfig == False: FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1") if github_actions and os.path.exists("./firmware/firmware"): - shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota") + shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota", dirs_exist_ok=True) if variants_dir: shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True) elif ("CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags) and flag_custom_sdkconfig == False: FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD") if github_actions and os.path.exists("./firmware/firmware"): - shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota") + shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota", dirs_exist_ok=True) if variants_dir: shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True) else: FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32") if github_actions and os.path.exists("./firmware/firmware"): - shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota") + shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota", dirs_exist_ok=True) if variants_dir: shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)