File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { Browser , launch , LaunchOptions } from 'puppeteer' ;
2
2
import { Observable } from 'rxjs' ;
3
3
import { shareReplay , take } from 'rxjs/operators' ;
4
+ import { log } from '../utils/log' ;
4
5
import * as yargs from 'yargs' ;
5
6
6
7
const { showBrowser} = yargs
@@ -20,6 +21,12 @@ function obsBrowser(
20
21
args : [ '--no-sandbox' , '--disable-setuid-sandbox' ] ,
21
22
}
22
23
) : Observable < Browser > {
24
+ const { SCULLY_PUPPETEER_EXECUTABLE_PATH } = process . env ;
25
+ if ( SCULLY_PUPPETEER_EXECUTABLE_PATH ) {
26
+ log ( `Launching puppeteer with executablePath ${ SCULLY_PUPPETEER_EXECUTABLE_PATH } ` ) ;
27
+ options . executablePath = SCULLY_PUPPETEER_EXECUTABLE_PATH ;
28
+ options . args = [ ...options . args , '--disable-dev-shm-usage' ] ;
29
+ }
23
30
return new Observable ( obs => {
24
31
const promisedBrowser = launch ( options ) ;
25
32
promisedBrowser
You can’t perform that action at this time.
0 commit comments