We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c87dc00 commit 38f68d8Copy full SHA for 38f68d8
1 file changed
git/git.go
@@ -10,6 +10,7 @@ import (
10
"os/exec"
11
"path"
12
"regexp"
13
+ "runtime"
14
"strings"
15
16
"github.com/cli/cli/internal/run"
@@ -110,7 +111,11 @@ func Config(name string) (string, error) {
110
111
var GitCommand = func(args ...string) (*exec.Cmd, error) {
112
gitExe, err := safeexec.LookPath("git")
113
if err != nil {
- return nil, err
114
+ programName := "git"
115
+ if runtime.GOOS == "windows" {
116
+ programName = "Git for Windows"
117
+ }
118
+ return nil, fmt.Errorf("unable to find git executable in PATH; please install %s before retrying", programName)
119
}
120
return exec.Command(gitExe, args...), nil
121
0 commit comments