From 6a00cfb005c4874eacc2ac5625969e90542e2926 Mon Sep 17 00:00:00 2001 From: Bernard Xie Date: Thu, 17 Nov 2022 16:49:07 -0800 Subject: [PATCH] Report playwright installation errors --- lib/png/png.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/png/png.go b/lib/png/png.go index 7fbcc67b6..e65ac2f5e 100644 --- a/lib/png/png.go +++ b/lib/png/png.go @@ -73,7 +73,7 @@ func InitPlaywright() (Playwright, error) { cmd := exec.Command(driver.DriverBinaryLocation, "--version") output, err := cmd.Output() 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)) { err = playwright.Install() @@ -82,7 +82,7 @@ func InitPlaywright() (Playwright, error) { } } } 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()