check windows start command

Former-commit-id: 2e068b709d63c84d8c03aa34c31042591a522fa0 [formerly 2e068b709d63c84d8c03aa34c31042591a522fa0 [formerly af93894fd36ce85391927d443aebba703fcc3186 [formerly c1a618f2f90a3d91edc9a590578c61f8c81930d8]]]
Former-commit-id: b13fb9bae33624b266425932d71c894171abeeda
Former-commit-id: d3ecf8db0c2f2585198716d01a21b22ca1ddf3c3 [formerly 37bc067bb1b69824fdf044ec4d7d0053141081b4]
Former-commit-id: cb92a851fad49ef5cf6035cc419dfe83913cd2fd
pull/15/head
Miguel Mota 6 years ago
parent 7abc903bee
commit fe5c9ec9d8

@ -2,14 +2,16 @@ package open
import (
"os/exec"
"strings"
)
var openCmd string
var possibleCmds = []string{
"xdg-open", // linux
"open", // mac
"start", // windows?
"cygstart", // windows?
"xdg-open", // linux
"gnome-open", // linux
"open", // mac
"start", // windows
"cygstart", // windows
}
func init() {
@ -19,7 +21,7 @@ func init() {
continue
}
bin := string(out)
bin := strings.TrimSpace(string(out))
if bin != "" {
openCmd = possibleCmds[i]
}

Loading…
Cancel
Save