Commit 109acd9
fix: overwrite stale boot props when settings_path no longer exists (#1108)
* fix: overwrite stale boot props when settings_path no longer exists
If a previous install directory was deleted (e.g. a temp CI dir), the
boot props file persists pointing at a dead path. A reinstall with
ROOTPATH set would silently skip updating it, leaving every `harper`
invocation triggering the interactive wizard because isHdbInstalled()
fails against the missing path.
Now also rewrite boot props when the existing file's settings_path
resolves to a non-existent directory, regardless of ROOTPATH.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: anchor settings_path regex, strip quotes, flatten IIFE
Cross-model review flagged:
- regex without /m and line-start anchor could match commented-out
settings_path lines and falsely flag a valid install as stale
- extracted path could include surrounding quotes if file was hand-edited
- IIFE was harder to follow and ran existsSync twice
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 185b896 commit 109acd9
1 file changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
447 | 466 | | |
448 | 467 | | |
449 | 468 | | |
| |||
0 commit comments