forked from mirror/open-golang
Switched to using runhide to suppress command prompt on windows when opening UI
This commit is contained in:
parent
ba570a1119
commit
40c15a1b14
|
@ -5,6 +5,8 @@ package open
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/getlantern/runhide"
|
||||||
)
|
)
|
||||||
|
|
||||||
func cleaninput(input string) string {
|
func cleaninput(input string) string {
|
||||||
|
@ -13,9 +15,9 @@ func cleaninput(input string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func open(input string) *exec.Cmd {
|
func open(input string) *exec.Cmd {
|
||||||
return exec.Command("cmd", "/C", "start", "", cleaninput(input))
|
return runhide.Command("cmd", "/C", "start", "", cleaninput(input))
|
||||||
}
|
}
|
||||||
|
|
||||||
func openWith(input string, appName string) *exec.Cmd {
|
func openWith(input string, appName string) *exec.Cmd {
|
||||||
return exec.Command("cmd", "/C", "start", "", appName, cleaninput(input))
|
return runhide.Command("cmd", "/C", "start", "", appName, cleaninput(input))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue