File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ const fsWriteFileAsync = util.promisify(fs.writeFile.bind(fs));
3333const removeFolderAsync = util . promisify ( removeFolder ) ;
3434
3535export async function installBrowsersWithProgressBar ( packagePath : string ) {
36- if ( getFromENV ( 'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD' ) ) {
36+ // PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD should have a value of 0 or 1
37+ if ( ! ! Number ( getFromENV ( 'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD' ) ) ) {
3738 browserFetcher . logPolitely ( 'Skipping browsers download because `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` env variable is set' ) ;
3839 return false ;
3940 }
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ export function isUnderTest(): boolean {
9797
9898export function getFromENV ( name : string ) {
9999 let value = process . env [ name ] ;
100- value = value || process . env [ `npm_config_${ name . toLowerCase ( ) } ` ] ;
101- value = value || process . env [ `npm_package_config_${ name . toLowerCase ( ) } ` ] ;
100+ value = value ?? process . env [ `npm_config_${ name . toLowerCase ( ) } ` ] ;
101+ value = value ?? process . env [ `npm_package_config_${ name . toLowerCase ( ) } ` ] ;
102102 return value ;
103103}
104104
You can’t perform that action at this time.
0 commit comments