Skip to content

Commit 045868b

Browse files
committedSep 9, 2021
Add support for NetBSD.
1 parent 6d279e1 commit 045868b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
 

‎browser_netbsd.go

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package browser
2+
3+
import (
4+
"errors"
5+
"os/exec"
6+
)
7+
8+
func openBrowser(url string) error {
9+
err := runCmd("xdg-open", url)
10+
if e, ok := err.(*exec.Error); ok && e.Err == exec.ErrNotFound {
11+
return errors.New("xdg-open: command not found - install xdg-utils from pkgsrc(7)")
12+
}
13+
return err
14+
}

‎browser_unsupported.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !linux,!windows,!darwin,!openbsd,!freebsd
1+
// +build !linux,!windows,!darwin,!openbsd,!freebsd,!netbsd
22

33
package browser
44

0 commit comments

Comments
 (0)
Please sign in to comment.