Skip to content

Commit 383a515

Browse files
authored
safe guards
to prevent install fail
1 parent 3b826e8 commit 383a515

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def configure_default_packages(self, variables, targets):
7676
self.packages["tool-openocd"]["optional"] = False
7777
self.packages["tool-openocd"]["version"] = tl_path
7878

79-
if os.path.isdir("ulp"):
79+
if os.path.isdir("ulp") and os.path.exists(IDF_TOOLS):
8080
ulp_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tc-ulp")
8181
self.packages["tc-ulp"]["optional"] = False
8282
self.packages["tc-ulp"]["version"] = ulp_path
@@ -108,7 +108,7 @@ def configure_default_packages(self, variables, targets):
108108
self.packages[gdb_package]["version"] = tl_path
109109

110110
# Common packages for IDF and mixed Arduino+IDF projects
111-
if "espidf" in frameworks:
111+
if "espidf" in frameworks and os.path.exists(IDF_TOOLS):
112112
ulp_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tc-ulp")
113113
self.packages["tc-ulp"]["optional"] = False
114114
self.packages["tc-ulp"]["version"] = ulp_path

0 commit comments

Comments
 (0)