Repository navigation
Commit 0a6d925
committed
fix: abort on chown failure, recursive TOML null check, reject \r in dotenv values
- _atomic.py: abort atomic replacement when os.chown fails instead of
silently installing a caller-owned file the application cannot read.
Both atomic_write_text and atomic_write_bytes now raise OSError with
a descriptive message when ownership preservation fails.
- cli.py TOML null check: recursively scan lists and nested dicts for
embedded None values so cross-format fixes like items: [1, null]
fail cleanly before tomli_w raises TypeError during serialization.
- cli.py dotenv multiline: reject carriage returns (\r) alongside
newlines (\n) since universal-newline readers treat \r as a line
boundary, truncating the setting and causing perpetual drift.
Addresses Codex review: _atomic.py:44 (P1), cli.py:514 (P2),
cli.py:562 (P2)1 parent 43a9b57 commit 0a6d925
2 files changed
Lines changed: 45 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 43 | | |
43 | | - | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
69 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
| 79 | + | |
| 80 | + | |
71 | 81 | | |
72 | | - | |
73 | | - | |
74 | 82 | | |
75 | | - | |
76 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
77 | 90 | | |
78 | 91 | | |
79 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
516 | 524 | | |
517 | 525 | | |
518 | 526 | | |
| |||
553 | 561 | | |
554 | 562 | | |
555 | 563 | | |
556 | | - | |
557 | | - | |
558 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
559 | 569 | | |
560 | 570 | | |
561 | | - | |
| 571 | + | |
562 | 572 | | |
563 | 573 | | |
564 | 574 | | |
565 | | - | |
566 | | - | |
| 575 | + | |
| 576 | + | |
567 | 577 | | |
568 | 578 | | |
569 | 579 | | |
| |||
0 commit comments