Commit 9cec714
committed
fix: preserve owner during atomic replace, normalize dotenv booleans, reject dotted keys
- _atomic.py atomic_write_text/bytes: call os.chown(tmp, st_uid,
st_gid) after os.chmod so application-owned configs remain readable
after a privileged deployment user runs fix.
- cli.py fix: normalize boolean baseline values to lowercase strings
before comparison when target is dotenv, so True/true converges
instead of perpetually drifting.
- cli.py fix dotenv branch: reject keys containing dots (dotted keys
from flattened JSON/YAML baselines) since _load_dotenv only accepts
[A-Za-z_][A-Za-z0-9_]* identifiers and silently drops others.
Addresses Codex review: _atomic.py:39 (P1), cli.py:502 (P2),
cli.py:509 (P2)1 parent d9ee511 commit 9cec714
2 files changed
Lines changed: 39 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | | - | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
362 | 369 | | |
363 | 370 | | |
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
367 | 374 | | |
368 | 375 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
373 | 387 | | |
374 | 388 | | |
375 | 389 | | |
| |||
491 | 505 | | |
492 | 506 | | |
493 | 507 | | |
494 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
495 | 523 | | |
496 | 524 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 525 | | |
501 | 526 | | |
502 | 527 | | |
| |||
0 commit comments