Commit 08c7e70
fix(extensions): preserve keep-config leftover on reinstall (data loss)
remove(keep_config=True) intentionally leaves the top-level *-config.yml /
*-config.local.yml in place and drops the registry entry. A subsequent
install_from_directory is not a --force removal (did_remove is False), so
the unconditional 'if dest_dir.exists(): shutil.rmtree(dest_dir)' wiped
the preserved config and the backup-restore path never ran — silently
destroying user configuration the feature promised to keep. Capture the
top-level *-config.yml/*-config.local.yml from an existing dest_dir before
the rmtree and write them back after the fresh copytree, mirroring the
*-config filter the --force restore path already uses.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 983a87f commit 08c7e70
2 files changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1400 | 1420 | | |
1401 | 1421 | | |
1402 | 1422 | | |
1403 | 1423 | | |
1404 | 1424 | | |
1405 | 1425 | | |
1406 | 1426 | | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1407 | 1433 | | |
1408 | 1434 | | |
1409 | 1435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1557 | 1557 | | |
1558 | 1558 | | |
1559 | 1559 | | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
1560 | 1583 | | |
1561 | 1584 | | |
1562 | 1585 | | |
| |||
0 commit comments