Skip to content

Commit

Permalink
fix(browser): browser process not found should exit
Browse files Browse the repository at this point in the history
  • Loading branch information
黄崇正 committed Jun 8, 2022
1 parent 56a044b commit 852cbd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/engine/browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func InitBrowser(chromiumPath string, incognito bool, extraHeaders map[string]in
)
// https://github.com/chromedp/chromedp/issues/824#issuecomment-845664441
// 如果需要在一个浏览器上创建多个tab,则需要先创建浏览器的上下文,即运行下面的语句
chromedp.Run(bctx)
err := chromedp.Run(bctx)
if err != nil {
// not found chrome process need exit
logger.Logger.Fatal("chromedp run error: ", err.Error())
}
bro.Cancel = &cancel
bro.Ctx = &bctx
bro.ExtraHeaders = extraHeaders
Expand Down

0 comments on commit 852cbd2

Please sign in to comment.