Merge pull request #7 from Byron/master

Adjusted linux open-code to assume existence of xdg-open.
This commit is contained in:
skratchdot 2014-09-05 17:31:39 -04:00
commit ba570a1119
1 changed files with 1 additions and 6 deletions

View File

@ -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 {