Report playwright installation errors
This commit is contained in:
parent
c2d8d17f46
commit
6a00cfb005
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ func InitPlaywright() (Playwright, error) {
|
||||||
cmd := exec.Command(driver.DriverBinaryLocation, "--version")
|
cmd := exec.Command(driver.DriverBinaryLocation, "--version")
|
||||||
output, err := cmd.Output()
|
output, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Playwright{}, fmt.Errorf("could not install Playwright driver")
|
return Playwright{}, fmt.Errorf("could not install Playwright driver: %v\nplease report this issue here: https://github.com/terrastruct/d2/issues/new", err.Error())
|
||||||
}
|
}
|
||||||
if !bytes.Contains(output, []byte(driver.Version)) {
|
if !bytes.Contains(output, []byte(driver.Version)) {
|
||||||
err = playwright.Install()
|
err = playwright.Install()
|
||||||
|
|
@ -82,7 +82,7 @@ func InitPlaywright() (Playwright, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Playwright{}, fmt.Errorf("could not install Playwright driver")
|
return Playwright{}, fmt.Errorf("could not find Playwright binary: %v\nplease report this issue here: https://github.com/terrastruct/d2/issues/new", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
pw, err := playwright.Run()
|
pw, err := playwright.Run()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue