From 8d8b0807e2dc330eb2c02e1a42d27d5778b45e33 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 22 Oct 2021 19:13:24 +0300 Subject: [PATCH] Fixed an issue when the "$PROJECT_DIR" gets the full path to "platformio.ini", not the directory name // Resolve #4086 --- HISTORY.rst | 5 +++++ platformio/debug/config/base.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 1089d25d..9801729e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,11 @@ PlatformIO Core 5 **A professional collaborative platform for embedded development** +5.2.3 (2021-??-??) +~~~~~~~~~~~~~~~~~~ + +- Fixed an issue when the "$PROJECT_DIR" gets the full path to "platformio.ini", not the directory name (`issue #4086 `_) + 5.2.2 (2021-10-20) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/debug/config/base.py b/platformio/debug/config/base.py index 65ceba60..de726bc9 100644 --- a/platformio/debug/config/base.py +++ b/platformio/debug/config/base.py @@ -210,7 +210,7 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes patterns = { "PLATFORMIO_CORE_DIR": get_project_core_dir(), "PYTHONEXE": proc.get_pythonexe_path(), - "PROJECT_DIR": self.project_config.path, + "PROJECT_DIR": os.getcwd(), "PROG_PATH": program_path, "PROG_DIR": os.path.dirname(program_path), "PROG_NAME": os.path.basename(os.path.splitext(program_path)[0]),