forked from mirror/open-golang
Merge pull request #7 from Byron/master
Adjusted linux open-code to assume existence of xdg-open.
This commit is contained in:
commit
ba570a1119
|
@ -4,15 +4,10 @@ package open
|
|||
|
||||
import (
|
||||
"os/exec"
|
||||
"path"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func open(input string) *exec.Cmd {
|
||||
// http://andrewbrookins.com/tech/golang-get-directory-of-the-current-file/
|
||||
_, file, _, _ := runtime.Caller(1)
|
||||
app := path.Join(path.Dir(file), "..", "vendor", "xdg-open")
|
||||
return exec.Command(app, input)
|
||||
return exec.Command("xdg-open", input)
|
||||
}
|
||||
|
||||
func openWith(input string, appName string) *exec.Cmd {
|
||||
|
|
Loading…
Reference in New Issue