mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-05 16:37:09 +00:00
chore(openBrowser): more detailed error logs
This commit is contained in:
@@ -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))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user