diff options
Diffstat (limited to 'cmd.go')
-rw-r--r-- | cmd.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,13 +5,18 @@ import ( "context" "errors" "os/exec" + "sync" ) +var mut sync.Mutex var gitbinpath string func findbin() string { if gitbinpath == "" { + mut.Lock() gitbinpath, _ = exec.LookPath("git") + mut.Unlock() + if gitbinpath == "" { panic("failed to find 'git' executable") } |