Skip to content

Commit

Permalink
Merge pull request #39 from fraggerfox/support-netbsd
Browse files Browse the repository at this point in the history
Add support for NetBSD.
  • Loading branch information
davecheney authored Sep 11, 2021
2 parents 6d279e1 + 045868b commit 681adbf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions browser_netbsd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 pkgsrc(7)")
}
return err
}
2 changes: 1 addition & 1 deletion browser_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !linux,!windows,!darwin,!openbsd,!freebsd
// +build !linux,!windows,!darwin,!openbsd,!freebsd,!netbsd

package browser

Expand Down

0 comments on commit 681adbf

Please sign in to comment.