Repository navigation
Commit 1db0301
committed
fix(extensions): deploy config where it is read, and contain the write
Addresses @Copilot's review.
Config now lands in .specify/extensions/<id>/ rather than the .specify/
root. ConfigManager._get_project_config() reads
.specify/extensions/<id>/<id>-config.yml, and the bundled scripts and
READMEs use the same path, so a scaffolded git-config.yml was being
written somewhere the git extension never looks.
Containment is checked component by component before .specify is used as
the root. Resolving it first and trusting the result let a symlinked
component point outside the project, after which every target satisfied
relative_to and copy2 wrote externally. This matches the project
safe-write path in shared_infra.
mkdir moved inside the OSError handler. A nested target like
foo/config.yml raised out of scaffolding when its parent could not be
created, and on extension add that happened after the extension was
already installed.
The 'Configuration may be required' warning is now conditional. It ran
unconditionally after the scaffolding block, so it contradicted the
success output directly above it and fired for extensions with no
provides.config at all.
Tests cover the corrected location, a symlinked config root, and an
uncreatable nested target.1 parent 1f32ec0 commit 1db0301
3 files changed
Lines changed: 123 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2478 | 2478 | | |
2479 | 2479 | | |
2480 | 2480 | | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
2481 | 2506 | | |
2482 | 2507 | | |
2483 | 2508 | | |
| |||
2515 | 2540 | | |
2516 | 2541 | | |
2517 | 2542 | | |
2518 | | - | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
2519 | 2557 | | |
2520 | 2558 | | |
2521 | 2559 | | |
| |||
2530 | 2568 | | |
2531 | 2569 | | |
2532 | 2570 | | |
2533 | | - | |
| 2571 | + | |
2534 | 2572 | | |
2535 | 2573 | | |
2536 | | - | |
| 2574 | + | |
2537 | 2575 | | |
2538 | 2576 | | |
2539 | 2577 | | |
| |||
2546 | 2584 | | |
2547 | 2585 | | |
2548 | 2586 | | |
2549 | | - | |
2550 | 2587 | | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
2551 | 2593 | | |
2552 | 2594 | | |
2553 | 2595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
| 716 | + | |
716 | 717 | | |
717 | 718 | | |
718 | 719 | | |
719 | | - | |
| 720 | + | |
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
| |||
726 | 727 | | |
727 | 728 | | |
728 | 729 | | |
729 | | - | |
730 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
731 | 737 | | |
732 | 738 | | |
733 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10328 | 10328 | | |
10329 | 10329 | | |
10330 | 10330 | | |
10331 | | - | |
| 10331 | + | |
10332 | 10332 | | |
10333 | 10333 | | |
10334 | 10334 | | |
| |||
10348 | 10348 | | |
10349 | 10349 | | |
10350 | 10350 | | |
10351 | | - | |
10352 | | - | |
| 10351 | + | |
| 10352 | + | |
| 10353 | + | |
| 10354 | + | |
| 10355 | + | |
| 10356 | + | |
| 10357 | + | |
10353 | 10358 | | |
10354 | 10359 | | |
10355 | 10360 | | |
10356 | 10361 | | |
10357 | 10362 | | |
10358 | 10363 | | |
10359 | 10364 | | |
10360 | | - | |
10361 | 10365 | | |
10362 | 10366 | | |
10363 | 10367 | | |
| |||
10366 | 10370 | | |
10367 | 10371 | | |
10368 | 10372 | | |
| 10373 | + | |
10369 | 10374 | | |
10370 | 10375 | | |
10371 | 10376 | | |
10372 | 10377 | | |
10373 | 10378 | | |
10374 | 10379 | | |
10375 | 10380 | | |
10376 | | - | |
| 10381 | + | |
10377 | 10382 | | |
10378 | 10383 | | |
10379 | 10384 | | |
| |||
10506 | 10511 | | |
10507 | 10512 | | |
10508 | 10513 | | |
| 10514 | + | |
| 10515 | + | |
| 10516 | + | |
| 10517 | + | |
| 10518 | + | |
| 10519 | + | |
| 10520 | + | |
| 10521 | + | |
| 10522 | + | |
| 10523 | + | |
| 10524 | + | |
| 10525 | + | |
| 10526 | + | |
| 10527 | + | |
| 10528 | + | |
| 10529 | + | |
| 10530 | + | |
| 10531 | + | |
| 10532 | + | |
| 10533 | + | |
| 10534 | + | |
| 10535 | + | |
| 10536 | + | |
| 10537 | + | |
| 10538 | + | |
| 10539 | + | |
| 10540 | + | |
| 10541 | + | |
| 10542 | + | |
| 10543 | + | |
| 10544 | + | |
| 10545 | + | |
| 10546 | + | |
| 10547 | + | |
| 10548 | + | |
| 10549 | + | |
| 10550 | + | |
| 10551 | + | |
| 10552 | + | |
| 10553 | + | |
| 10554 | + | |
| 10555 | + | |
| 10556 | + | |
| 10557 | + | |
| 10558 | + | |
| 10559 | + | |
| 10560 | + | |
| 10561 | + | |
| 10562 | + | |
| 10563 | + | |
| 10564 | + | |
| 10565 | + | |
| 10566 | + | |
| 10567 | + | |
| 10568 | + | |
| 10569 | + | |
| 10570 | + | |
| 10571 | + | |
0 commit comments