-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] Cannot override .npmrc
env var PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
from true to false
#4225
Comments
An alternative would be to expose a script that allows for the end-user to manually install the browser binaries whenever they want. I believe |
Btw, for installing the browsers, you could also run |
Ah! That is very helpful! Looking at the Also def seems like a good addition to the installation docs! Happy to add some language there about |
I am actually not sure, but you can always run it in a separate folder!
That would be awesome! @arjunattam FYI |
This is now fixed! Thank you @majapw! |
Thank you! |
Context:
Describe the bug
The scenario we have is that we want to skip installing browsers by default in our ecosystem, but manually install browsers if a person is running playwright code locally or as part of the CI job that runs playwright code. As a result we set the following in our
.npmrc
:Unfortunately,
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="" yarn
does not override this value (or any variation of this). I think this is because the concept of overriding env vars in the playwright repo is predicated on the idea of overriding falsey values with truthy values and not the other way around.If we look at the code to skip the browser install:
export function getFromENV(name: string) {
let value = process.env[name];
value = value || process.env[
npm_config_${name.toLowerCase()}
];value = value || process.env[
npm_package_config_${name.toLowerCase()}
];return value;
}
The text was updated successfully, but these errors were encountered: