File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -90,13 +90,16 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
9090 if ( customDevTools ) {
9191 args . push ( `--custom-devtools-frontend=file://${ customDevTools } ` ) ;
9292 }
93- let puppeterChannel : ChromeReleaseChannel | undefined ;
94- if ( ! executablePath ) {
95- puppeterChannel =
96- channel && channel !== 'stable'
97- ? ( `chrome-${ channel } ` as ChromeReleaseChannel )
98- : 'chrome' ;
99- }
93+ // Prefer executablePath over channel
94+ let puppeterChannel : ChromeReleaseChannel | undefined ;
95+ if ( ! executablePath ) {
96+ puppeterChannel =
97+ channel && channel !== 'stable'
98+ ? ( `chrome-${ channel } ` as ChromeReleaseChannel )
99+ : 'chrome' ;
100+ } else {
101+ puppeterChannel = undefined ; // <-- ensures channel is not set when executablePath is used
102+ }
100103
101104 try {
102105 const browser = await puppeteer . launch ( {
You can’t perform that action at this time.
0 commit comments