Skip to content

Commit 911560c

Browse files
committed
copy missing package.json manifest
1 parent f2e7676 commit 911560c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

platform.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import json
2020
import re
2121
import requests
22+
import shutil
2223
from os.path import isfile, isdir, join
2324

2425
from platformio.public import PlatformBase, to_unix_path
@@ -44,10 +45,12 @@ def configure_default_packages(self, variables, targets):
4445
self.packages["tl-install"]["optional"] = False
4546

4647
# IDF Install is needed only one time
47-
if not os.path.exists(join(IDF_TOOLS_PATH_DEFAULT, "tools")):
48+
if not os.path.exists(join(IDF_TOOLS_PATH_DEFAULT, "tools")) and os.path.exists(IDF_TOOLS):
4849
rc = subprocess.call(IDF_TOOLS_CMD)
4950
if rc != 0:
5051
sys.stderr.write("Error: Couldn't execute 'idf_tools.py install' \n")
52+
else:
53+
shutil.copytree(join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-packages"), join(IDF_TOOLS_PATH_DEFAULT, "tools"), symlinks=False, ignore=None, ignore_dangling_symlinks=False, dirs_exist_ok=True)
5154

5255

5356
if "arduino" in frameworks:

0 commit comments

Comments
 (0)