Skip to content

Add support for NetBSD. #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add support for NetBSD.
  • Loading branch information
fraggerfox committed Sep 9, 2021
commit 045868bcaa26b12921b64e460390a62803e6c1aa
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