diff --git a/HISTORY.rst b/HISTORY.rst index 0acfa211..c7b8f88e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -24,6 +24,7 @@ PlatformIO Core 6 * Do not resolve project dependencies for the ``cleanall`` target (`issue #4344 `_) * Warn about calling "env.BuildSources" in a POST-type script (`issue #4385 `_) * Fixed an issue when escaping macros/defines for IDE integration (`issue #4360 `_) +* Fixed an issue when the "cleanall" target removes dependencies from all working environments (`issue #4386 `_) 6.1.3 (2022-07-18) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piotarget.py b/platformio/builder/tools/piotarget.py index d9f616a5..51333e4d 100644 --- a/platformio/builder/tools/piotarget.py +++ b/platformio/builder/tools/piotarget.py @@ -45,7 +45,7 @@ def PioClean(env, clean_all=False): fs.rmtree(path) build_dir = env.subst("$BUILD_DIR") - libdeps_dir = env.subst("$PROJECT_LIBDEPS_DIR") + libdeps_dir = env.subst(os.path.join("$PROJECT_LIBDEPS_DIR", "$PIOENV")) if os.path.isdir(build_dir): _clean_dir(build_dir) else: