diff options
Diffstat (limited to 'runner/shell/shell.go')
| -rw-r--r-- | runner/shell/shell.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runner/shell/shell.go b/runner/shell/shell.go index 7972bf0..53b4df3 100644 --- a/runner/shell/shell.go +++ b/runner/shell/shell.go @@ -64,14 +64,14 @@ func (s *shell) Wants(f fs.FS, file string, entry fs.DirEntry) (bool, error) { } func (s *shell) Find(shell string) (string, error) { + s.Lock() + defer s.Unlock() if s.Locations[shell] != "" { return s.Locations[shell], nil } if p, err := exec.LookPath(shell); err == nil { - s.Lock() s.Locations[shell] = p - s.Unlock() return shell, nil } else { return "", err |
