chore(openBrowser): more detailed error logs

This commit is contained in:
2025-11-07 12:42:19 +01:00
parent 0bfe6371fd
commit 93f7b17222
+3 -1
View File
@@ -23,13 +23,15 @@ func OpenBrowserWindow(url string, fullscreen bool, temp bool) error {
args = append(args, arg) args = append(args, arg)
} }
errs := []string{}
for _, bin := range bins { for _, bin := range bins {
cmd := exec.Command(bin, args...) cmd := exec.Command(bin, args...)
commandOutput := RunShellCommand(cmd) commandOutput := RunShellCommand(cmd)
if commandOutput.ExitCode == 0 { if commandOutput.ExitCode == 0 {
return nil return nil
} }
errs = append(errs, commandOutput.Stderr)
} }
return errors.New("chromium not found in PATH") return errors.New("failed to open browser window: " + fmt.Sprint(errs))
} }