Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
"type": "tool",
"optional": false,
"owner": "pioarduino",
"package-version": "5.3.0",
"version": "https://github.com/pioarduino/esp_install/releases/download/v5.3.0/esp_install-v5.3.0.zip"
"package-version": "5.3.1",
"version": "https://github.com/pioarduino/esp_install/releases/download/v5.3.1/esp_install-v5.3.1.zip"
},
"contrib-piohome": {
"optional": true,
Expand Down
13 changes: 6 additions & 7 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@
if IS_WINDOWS:
os.environ["PLATFORMIO_SYSTEM_TYPE"] = "windows_amd64"

# Clear IDF_TOOLS_PATH, if set tools may be installed in the wrong place
os.environ["IDF_TOOLS_PATH"] = ""
# Set IDF_TOOLS_PATH to Pio core_dir
PROJECT_CORE_DIR=ProjectConfig.get_instance().get("platformio", "core_dir")
IDF_TOOLS_PATH=os.path.join(PROJECT_CORE_DIR)
os.environ["IDF_TOOLS_PATH"] = IDF_TOOLS_PATH

Comment thread
Jason2866 marked this conversation as resolved.
# Global variables
python_exe = get_pythonexe_path()
Expand Down Expand Up @@ -478,19 +480,16 @@ def _install_with_idf_tools(self, tool_name: str, paths: Dict[str, str]) -> bool
return False

# Copy tool files
tools_path_default = os.path.join(
os.path.expanduser("~"), ".platformio"
)
target_package_path = os.path.join(
tools_path_default, "tools", tool_name, "package.json"
IDF_TOOLS_PATH, "tools", tool_name, "package.json"
)

if not safe_copy_file(paths['package_path'], target_package_path):
return False

safe_remove_directory(paths['tool_path'])

tl_path = f"file://{os.path.join(tools_path_default, 'tools', tool_name)}"
tl_path = f"file://{os.path.join(IDF_TOOLS_PATH, 'tools', tool_name)}"
Comment thread
Jason2866 marked this conversation as resolved.
pm.install(tl_path)

logger.info(f"Tool {tool_name} successfully installed")
Expand Down