MCPcopy
hub / github.com/git-lfs/git-lfs / findExecutable

Function findExecutable

subprocess/path_nix.go:42–51  ·  view source on GitHub ↗
(file string, exts []string)

Source from the content-addressed store, hash-verified

40}
41
42func findExecutable(file string, exts []string) (string, error) {
43 d, err := os.Stat(file)
44 if err != nil {
45 return "", err
46 }
47 if m := d.Mode(); !m.IsDir() && m&0111 != 0 {
48 return file, nil
49 }
50 return "", os.ErrPermission
51}

Callers 1

LookPathFunction · 0.70

Calls 1

ModeMethod · 0.80

Tested by

no test coverage detected