From 04d5a473d758090b0f65af5520e91bc7924648a1 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 1 Sep 2018 12:22:33 +1000 Subject: [PATCH] use start instead of cygstart to open files on windows --- pkg/commands/os.go | 2 +- pkg/commands/os_linux.go | 2 +- pkg/commands/os_windows.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/commands/os.go b/pkg/commands/os.go index c3574f98e..680105df8 100644 --- a/pkg/commands/os.go +++ b/pkg/commands/os.go @@ -111,7 +111,7 @@ func (c *OSCommand) OpenFile(filename string) error { } command := utils.ResolvePlaceholderString(commandTemplate, templateValues) - _, err := c.RunDirectCommand(command) + err := c.RunCommand(command) return err } diff --git a/pkg/commands/os_linux.go b/pkg/commands/os_linux.go index cbd037139..c17ebc98f 100644 --- a/pkg/commands/os_linux.go +++ b/pkg/commands/os_linux.go @@ -10,6 +10,6 @@ func getPlatform() *Platform { shell: "bash", shellArg: "-c", escapedQuote: "\"", - openCommand: "xdg-open {{filename}} &>/dev/null &", + openCommand: "bash -c \"xdg-open {{filename}} &>/dev/null &\"", } } diff --git a/pkg/commands/os_windows.go b/pkg/commands/os_windows.go index 5b50d2c38..f41c6d2b9 100644 --- a/pkg/commands/os_windows.go +++ b/pkg/commands/os_windows.go @@ -6,6 +6,6 @@ func getPlatform() *Platform { shell: "cmd", shellArg: "/c", escapedQuote: "\\\"", - openCommand: "cygstart {{filename}}", + openCommand: "start {{filename}}", } }