fix: Install Playwright and browsers before initializing

This commit is contained in:
Arik Jones (aider)
2024-09-17 14:48:15 -05:00
parent 056c3e368e
commit 4586b5daaa

View File

@@ -116,6 +116,13 @@ func SetupLogger(verbose bool) {
func InitPlaywright() error {
logger.Println("Initializing Playwright")
var err error
// Install Playwright and browsers
err = playwright.Install()
if err != nil {
return fmt.Errorf("could not install Playwright: %v", err)
}
pw, err = playwright.Run()
if err != nil {
return fmt.Errorf("could not start Playwright: %v", err)