Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.

Commit a466fa4

Browse files
committed
update error message at browser_openbsd.go
1 parent 1de401b commit a466fa4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

browser_openbsd.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ package browser
22

33
import (
44
"errors"
5+
"fmt"
56
"os/exec"
67
)
78

89
func openBrowser(url string) error {
910
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 ports(8)")
11+
if errors.Is(err, exec.ErrNotFound) {
12+
return fmt.Errorf("%w - install xdg-utils from ports(8)", err)
1213
}
14+
1315
return err
1416
}
17+
18+
func setFlags(cmd *exec.Cmd) {}

0 commit comments

Comments
 (0)