Skip to content

Commit

Permalink
check for kak executable
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 15, 2021
1 parent ee4bac5 commit b40be31
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kak/kak.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package kak

import (
"errors"
"os/exec"
"strings"
)
Expand Down Expand Up @@ -64,3 +65,11 @@ func Sessions() (sessions []Session, err error) {

return sessions, nil
}

func kakExec() (kakExec string, err error) {
kakExec, err = exec.LookPath("kak")
if err != nil {
return "", errors.New("'kak' executable not found in $PATH")
}
return kakExec, nil
}

0 comments on commit b40be31

Please sign in to comment.