Skip to content

Commit 4a0d8cf

Browse files
authored
Fix crash when Framework is not installed
1 parent c851d82 commit 4a0d8cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

builder/frameworks/arduino.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ def safe_remove_sdkconfig_files():
565565

566566
SConscript("_embed_files.py", exports="env")
567567

568-
flag_any_custom_sdkconfig = exists(str(Path(FRAMEWORK_LIB_DIR) / "sdkconfig"))
568+
flag_any_custom_sdkconfig = (FRAMEWORK_LIB_DIR is not None and
569+
exists(str(Path(FRAMEWORK_LIB_DIR) / "sdkconfig")))
569570

570571

571572
def has_unicore_flags():
@@ -644,6 +645,8 @@ def call_compile_libs():
644645
def is_framework_subfolder(potential_subfolder):
645646
"""Check if a path is a subfolder of the framework SDK directory"""
646647
# carefully check before change this function
648+
if FRAMEWORK_SDK_DIR is None:
649+
return False
647650
if not isabs(potential_subfolder):
648651
return False
649652
if (splitdrive(FRAMEWORK_SDK_DIR)[0] !=

0 commit comments

Comments
 (0)