From bc482ebb5fa7b8972929f940ff090e8c60ee5fb8 Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Wed, 27 Sep 2023 22:26:49 -0700 Subject: [PATCH] really clean build directory --- esphome/writer.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/esphome/writer.py b/esphome/writer.py index ad506b6ae6..be612c2a88 100644 --- a/esphome/writer.py +++ b/esphome/writer.py @@ -354,14 +354,10 @@ def write_cpp(code_s): def clean_build(): import shutil - pioenvs = CORE.relative_pioenvs_path() - if os.path.isdir(pioenvs): - _LOGGER.info("Deleting %s", pioenvs) - shutil.rmtree(pioenvs) - piolibdeps = CORE.relative_piolibdeps_path() - if os.path.isdir(piolibdeps): - _LOGGER.info("Deleting %s", piolibdeps) - shutil.rmtree(piolibdeps) + build_dir = CORE.relative_build_path("") + if os.path.isdir(build_dir): + _LOGGER.info("Deleting %s", build_dir) + shutil.rmtree(build_dir) GITIGNORE_CONTENT = """# Gitignore settings for ESPHome