blurp/vendor/github.com/pkg/browser/browser_netbsd.go
decentral1se 9e9227b420
All checks were successful
continuous-integration/drone/push Build is passing
fix: error handling and vendor
2024-08-04 10:55:35 +02:00

15 lines
288 B
Go

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 pkgsrc(7)")
}
return err
}