Commit 72c1825
committed
Puppeteer _resolve_installed_browser_path: resolve alias via configured install_args
When the shim-first short-circuit was removed from
``default_abspath_handler``, ``load()`` started going through
``_resolve_installed_browser_path`` for every query. That helper
computed the canonical browser name from ``bin_name + install_args``,
but ``default_abspath_handler`` didn't forward any ``install_args``,
so it fell back to ``[bin_name]`` — which meant ``load("chrome")``
looked for ``puppeteer-browsers list`` entries whose browser name
was ``chrome``, missing installs that landed as ``chromium@latest``
via a ``{"chrome": {"install_args": ["chromium@latest"]}}`` override
(exactly the scenario ``test_chrome_alias_installs_real_browser_binary``
exercises).
Fix: when ``install_args`` isn't passed explicitly, fall back to
``self.get_install_args(bin_name)`` so the provider's own
handler-overrides map the alias (``chrome`` → ``chromium@latest``)
before ``_browser_name`` extracts the canonical package name.1 parent 9be4a6c commit 72c1825
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
388 | 395 | | |
389 | 396 | | |
390 | 397 | | |
| |||
0 commit comments