Skip to content

Commit e2891c0

Browse files
committed
configure.py: Write last key in each section
The loop that writes the keys in each section of bootstrap.toml accumulates all the commented lines before a given key and emits them when it reaches the next key in the section. This ends up dropping lines accumulated for the last key
1 parent 1b0bc59 commit e2891c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/configure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,10 @@ def write_uncommented(target, f):
752752
is_comment = True
753753
continue
754754
is_comment = is_comment and line.startswith("#")
755+
# Write the last accumulated block
756+
if len(block) > 0 and not is_comment:
757+
for ln in block:
758+
f.write(ln + "\n")
755759
return f
756760

757761

0 commit comments

Comments
 (0)