-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Storybook does not respect BROWSER env var if default browser is not chromium based. #21343
Comments
5 tasks
I guess so-- something odd is happening here ! |
hahaha |
5 tasks
there we go, fingers crossed this one merges ok 😉 |
5 tasks
Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.21 containing PR #21473 that references this issue. Upgrade today to the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using the environment variable BROWSER to configure the browser that storybook opens in, storybook will not respect this configuration if the users default browser is not set to a browser which the
@aw-web-design/x-default-browser
package does not resolve to eitherchrome
,chromium
orcom.brave.browser
.To Reproduce
To reproduce
Set the system default browser to something not based on chromium
eg:
safari
Clone the reproduction repo
mkdir repo-test cd repo-test git clone https://github.com/thtliife/storybook-specify-browser-repro
Install dependencies
Run storybook with the BROWSER environment variable set to something other than the default system browser:
or create a .env file in the root of the project with the following contents:
then run storybook
System
Additional context
The problem is caused by the
open-in-browser
utility not passing args toopen
when the default browser is not chromium.If the default browser is a chromium browser,
better-opn
is used which does its own evaluation of environment variables, allowing the BROWSER variable to be evaluated.The text was updated successfully, but these errors were encountered: