Use "open" instead of "xdg-open" on Darwin systems

This commit is contained in:
Ben Burwell 2019-07-02 18:21:34 -04:00 committed by Drew DeVault
parent 687f1d8c1a
commit 1bb1a80156
4 changed files with 25 additions and 4 deletions

12
lib/open.go Normal file
View file

@ -0,0 +1,12 @@
// +build !darwin
package lib
import (
"os/exec"
)
func OpenFile(filename string) error {
cmd := exec.Command("xdg-open", filename)
return cmd.Run()
}