Commits

Miki Tebeka committed 91c249a

Cannot call start directly (thanks minux)

Comments (0)

Files changed (1)

 	"runtime"
 )
 
-var commands = map[string]string{
-	"windows": "start",
-	"darwin":  "open",
-	"linux":   "xdg-open",
+var commands = map[string][]string{
+	"windows": []string{"cmd", "/c", "start"},
+	"darwin":  []string{"open",},
+	"linux":   []string{"xdg-open",},
 }
 
 var Version = "0.1.0"
 		return fmt.Errorf("don't know how to open things on %s platform", runtime.GOOS)
 	}
 
-	cmd := exec.Command(run, uri)
+	run = append(run, uri)
+
+	cmd := exec.Command(run[0], run[1:]...)
 	return cmd.Start()
 }