VictoriaMetrics/vendor/github.com/pkg/browser/browser_openbsd.go

15 lines
287 B
Go
Raw Normal View History

2023-07-07 07:05:50 +00:00
package browser
import (
"errors"
"os/exec"
)
func openBrowser(url string) error {
err := runCmd("xdg-open", url)
if e, ok := err.(*exec.Error); ok && e.Err == exec.ErrNotFound {
return errors.New("xdg-open: command not found - install xdg-utils from ports(8)")
}
return err
}