Commit 2aa1add
🐛 Fix _write_env_file data loss issue
Preserve custom environment variables when running `onboard env`:
- Load existing .env before overwriting
- Identify custom keys not in .env.example
- Append under "# Custom variables" section
Fixes critical data loss bug where user-added env vars were silently
deleted. Addresses Greptile review feedback on lines 335-356.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c51732a commit 2aa1add
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
337 | 342 | | |
338 | 343 | | |
339 | 344 | | |
| |||
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
355 | 367 | | |
356 | 368 | | |
357 | 369 | | |
| |||
0 commit comments