MCPcopy Create free account
hub / github.com/cli/cli / findSh

Function findSh

pkg/cmd/root/alias.go:127–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127func findSh() (string, error) {
128 shPath, err := findsh.Find()
129 if err != nil {
130 if errors.Is(err, exec.ErrNotFound) {
131 if runtime.GOOS == "windows" {
132 return "", errors.New("unable to locate sh to execute the shell alias with. The sh.exe interpreter is typically distributed with Git for Windows.")
133 }
134 return "", errors.New("unable to locate sh to execute shell alias with")
135 }
136 return "", err
137 }
138 return shPath, nil
139}

Callers

nothing calls this directly

Calls 1

FindFunction · 0.92

Tested by

no test coverage detected