Commit d0aebe8
committed
All providers: never treat managed shims as source-of-truth for load()
Core principle (per maintainer): the symlinks/shims abxpkg writes under
``bin_dir`` are a human-convenience side-effect of install, not a
source of truth. ``load()`` and every other internal lookup must
always consult the underlying package manager / CLI instead.
Audit result — only three providers had a "shim-first" short-circuit
in ``default_abspath_handler``; the others (``docker``, ``bash``
wrappers; ``npm``/``pip``/``pnpm``/``yarn``/``uv``/``cargo``/``gem``/
``goget`` where bin_dir IS the package manager's install location, not
a shim of something upstream) were already correct.
Fixed:
- ``BrewProvider``: removed the initial ``bin_abspath(bin_name,
PATH=str(self.bin_dir))`` short-circuit. Now always computes the
brew Cellar / opt / PATH search list first and only refreshes the
managed shim to match the freshly-resolved target.
- ``PuppeteerProvider``: removed the ``bin_dir/<name>`` shim check
before falling back to ``puppeteer-browsers list``. Now always asks
the CLI first, then refreshes the shim to point at the fresh path.
- ``PlaywrightProvider``: same — always asks ``playwright-core``'s
``executablePath()`` first, shim becomes output-only.
Also updated the uninstall-handler docstrings for both puppeteer and
playwright to reflect that dropping the shim is a cosmetic cleanup
(to keep managed PATH tidy) rather than a correctness requirement for
``load()``.1 parent 836123b commit d0aebe8
3 files changed
Lines changed: 30 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| |||
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
728 | | - | |
729 | | - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
730 | 734 | | |
731 | 735 | | |
732 | 736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
428 | 427 | | |
429 | 428 | | |
430 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
| |||
688 | 692 | | |
689 | 693 | | |
690 | 694 | | |
691 | | - | |
692 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
693 | 700 | | |
694 | 701 | | |
695 | 702 | | |
| |||
0 commit comments