Skip to content

Commit 1a7fd01

Browse files
authored
Use Pio core_dir for IDF_TOOLS_PATH
1 parent 0703db2 commit 1a7fd01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/idf_tools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,16 @@
8989
class WindowsError(OSError): # type: ignore
9090
pass
9191

92+
from platformio.project.config import ProjectConfig
9293

9394
TOOLS_FILE = 'tools/tools.json'
9495
TOOLS_SCHEMA_FILE = 'tools/tools_schema.json'
9596
TOOLS_FILE_NEW = 'tools/tools.new.json'
9697
IDF_ENV_FILE = 'idf-env.json'
9798
TOOLS_FILE_VERSION = 3
98-
IDF_TOOLS_PATH_DEFAULT = os.path.join('~', '.platformio')
99+
PROJECT_CORE_DIR=ProjectConfig.get_instance().get("platformio", "core_dir")
100+
IDF_TOOLS_PATH=os.path.join(PROJECT_CORE_DIR)
101+
IDF_TOOLS_PATH_DEFAULT = IDF_TOOLS_PATH
99102
UNKNOWN_VERSION = 'unknown'
100103
SUBST_TOOL_PATH_REGEX = re.compile(r'\${TOOL_PATH}')
101104
VERSION_REGEX_REPLACE_DEFAULT = r'\1'

0 commit comments

Comments
 (0)