Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c6a6324

Browse filesBrowse files
authored
Expand path to tinuf2 image when checking existence in platformio-build.py (espressif#7631)
* Expand path to tinuf2 image when checking existence * More isFiles fixed
1 parent 37c81dc commit c6a6324
Copy full SHA for c6a6324

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed

‎tools/platformio-build.py

Copy file name to clipboardExpand all lines: tools/platformio-build.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ def get_partition_table_csv(variants_dir):
5151

5252
if partitions_name:
5353
# A custom partitions file is selected
54-
if isfile(join(variant_partitions_dir, partitions_name)):
54+
if isfile(env.subst(join(variant_partitions_dir, partitions_name))):
5555
return join(variant_partitions_dir, partitions_name)
5656

5757
return abspath(
5858
join(fwpartitions_dir, partitions_name)
59-
if isfile(join(fwpartitions_dir, partitions_name))
59+
if isfile(env.subst(join(fwpartitions_dir, partitions_name)))
6060
else partitions_name
6161
)
6262

6363
variant_partitions = join(variant_partitions_dir, "partitions.csv")
6464
return (
6565
variant_partitions
66-
if isfile(variant_partitions)
66+
if isfile(env.subst(variant_partitions))
6767
else join(fwpartitions_dir, "default.csv")
6868
)
6969

@@ -81,7 +81,7 @@ def get_bootloader_image(variants_dir):
8181

8282
return (
8383
variant_bootloader
84-
if isfile(variant_bootloader)
84+
if isfile(env.subst(variant_bootloader))
8585
else generate_bootloader_image(
8686
join(
8787
FRAMEWORK_DIR,
@@ -126,8 +126,8 @@ def add_tinyuf2_extra_image():
126126
)
127127

128128
# Add the UF2 image only if it exists and it's not already added
129-
if not isfile(tinuf2_image):
130-
print("Warning! The `%s` UF2 bootloader image doesn't exist" % tinuf2_image)
129+
if not isfile(env.subst(tinuf2_image)):
130+
print("Warning! The `%s` UF2 bootloader image doesn't exist" % env.subst(tinuf2_image))
131131
return
132132

133133
if any(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.