Skip to content

Commit

Permalink
Update packages/data-context/src/data/ProjectLifecycleManager.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Schile <[email protected]>
  • Loading branch information
alexsch01 and mschile authored Nov 6, 2024
1 parent 2dddf0f commit 5f1d6b9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/data-context/src/data/ProjectLifecycleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,11 @@ export class ProjectLifecycleManager {
async setInitialActiveBrowser () {
const configBrowser = this.loadedFullConfig?.defaultBrowser

if (configBrowser) {
if (this.ctx.isRunMode && !this.ctx.modeOptions.isBrowserGivenByCli) {
this.ctx.setModeOptionsBrowser(configBrowser)
}

this.ctx.coreData.cliBrowser ??= configBrowser
// if we have a defaultBrowser from the config and a CLI browser wasn't passed,
// update the cliBrowser to the defaultBrowser from the config
// since we want the defaultBrowser to behave as if it was passed via CLI
if (configBrowser && !this.ctx.modeOptions.isBrowserGivenByCli) {
this.ctx.updateCliBrowser(configBrowser)
}

if (this.ctx.coreData.cliBrowser) {
Expand Down

0 comments on commit 5f1d6b9

Please sign in to comment.