From aad08e631b47fb9590a5102159794db42ac4dade Mon Sep 17 00:00:00 2001 From: Jeremy Stribling Date: Mon, 21 Aug 2017 17:07:01 -0700 Subject: plumbing: use LookPath instead of Stat to fix Windows executables When git-core isn't in the user's PATH, we need to use `LookPath` to verify the existence of the executable, rather than `os.Stat`, so that on Windows it will search for files with executable suffixes. --- plumbing/transport/file/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/transport/file/client.go') diff --git a/plumbing/transport/file/client.go b/plumbing/transport/file/client.go index af4a88b..d229fdd 100644 --- a/plumbing/transport/file/client.go +++ b/plumbing/transport/file/client.go @@ -66,7 +66,7 @@ func prefixExecPath(cmd string) (string, error) { cmd = filepath.Join(execPath, cmd) // Make sure it actually exists. - _, err = os.Stat(cmd) + _, err = exec.LookPath(cmd) if err != nil { return "", err } -- cgit