aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/pkg/browser/browser_openbsd.go
blob: 4fc7ff0761b49183e472e052d477aa4c29271f88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}