full path

Former-commit-id: b65be4fdc50ffd2e69383504f80b3900a8421e68 [formerly b65be4fdc50ffd2e69383504f80b3900a8421e68 [formerly 3e77cdfd18bdae4ec56f9fe2c23a9299f5948e77 [formerly b9342a4882192a1d706d48561062e4586242a6fb]]]
Former-commit-id: d0e7d16ce48dd9ad9cf423f2c9b77383c5605c82
Former-commit-id: 9904c3478cd9f6f862a1c50b934a06a03ae76df8 [formerly 82d04a1c8d96bcce0c5fa3ff30180c88f6d18cd2]
Former-commit-id: c46aa56c663020ae74dda7748bf7261f95639ee8
pull/15/head
Miguel Mota 6 years ago
parent 949fcce711
commit c8705a0864

@ -21,8 +21,8 @@ var possibleCmds = []string{
}
func init() {
for i, cmd := range possibleCmds {
out, err := exec.Command("command", "-v", cmd).Output()
for _, cmd := range possibleCmds {
out, err := exec.Command("/usr/bin/command", "-v", cmd).Output()
if err != nil {
log.Println("err ", err)
continue
@ -31,7 +31,7 @@ func init() {
log.Println("out ", string(out))
bin := strings.TrimSpace(string(out))
if bin != "" {
openCmd = possibleCmds[i]
openCmd = bin
break
}
}

Loading…
Cancel
Save