diff options
| author | Aleksey Kliger <alklig@microsoft.com> | 2025-07-07 14:54:50 -0400 |
|---|---|---|
| committer | Aleksey Kliger <alklig@microsoft.com> | 2025-07-07 14:54:50 -0400 |
| commit | e2891c0fb9060f80e6aa24e0dc0a9c43b0861b8f (patch) | |
| tree | 2f290b4122ba432964cb423817b1de069bbfcd5b /src/bootstrap/configure.py | |
| parent | 1b0bc594a75dfc1cdedc6c17052cf44de101e632 (diff) | |
| download | rust-e2891c0fb9060f80e6aa24e0dc0a9c43b0861b8f.tar.gz rust-e2891c0fb9060f80e6aa24e0dc0a9c43b0861b8f.zip | |
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
Diffstat (limited to 'src/bootstrap/configure.py')
| -rwxr-xr-x | src/bootstrap/configure.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index c077555b906..bec7a1c41b4 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -752,6 +752,10 @@ def write_uncommented(target, f): is_comment = True continue is_comment = is_comment and line.startswith("#") + # Write the last accumulated block + if len(block) > 0 and not is_comment: + for ln in block: + f.write(ln + "\n") return f |
