From 00211322a291dbf23c198deadcbbe78277440728 Mon Sep 17 00:00:00 2001 From: skratchdot Date: Tue, 4 Feb 2014 20:55:06 -0500 Subject: [PATCH] fixes #2 --- open/exec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open/exec.go b/open/exec.go index b225286..909851a 100644 --- a/open/exec.go +++ b/open/exec.go @@ -9,7 +9,8 @@ import ( ) func open(input string) *exec.Cmd { - _, file, _, _ := runtime.Caller(0) + // 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) }