diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-17 14:00:03 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-17 14:00:03 -0600 |
commit | ce0def95f3924a10b0faceb72aa5df18bf813fb1 (patch) | |
tree | 2f0300d84738343ea2fb9f13db1af1e649b41917 /cmd.go | |
parent | ebea6fe755fb052b79cbe05b6280611337e1e5f6 (diff) |
GOPHER
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") } |