Skip to content

Commit

Permalink
prevent chromedp from setting user-data-dir to a temp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
quantonganh committed Feb 23, 2024
1 parent 43813ae commit 00ff969
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/formula.go
Expand Up @@ -61,14 +61,9 @@ to quickly create a Cobra application.`,
func run(daysBefore uint, sendMail bool) error {
opts := append(
chromedp.DefaultExecAllocatorOptions[:],
chromedp.UserDataDir(""),
chromedp.Flag("headless", false),
)
if conf.ProfileDir != "" {
opts = append(
opts,
chromedp.Flag("profile-directory", conf.ProfileDir),
)
}
allocCtx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
defer cancel()

Expand Down

0 comments on commit 00ff969

Please sign in to comment.