()
| 125 | } |
| 126 | |
| 127 | func 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 | } |