From f00f5f9cf7da43a5c5f3c7ebd757b4293ac11f13 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Fri, 3 Dec 2021 21:48:17 +0100 Subject: [PATCH] fix(windows): force the use of .exe resolves #1369 --- src/environment.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/environment.go b/src/environment.go index 81480cee..8d828544 100644 --- a/src/environment.go +++ b/src/environment.go @@ -270,6 +270,9 @@ func (env *environment) getRuntimeGOOS() string { } func (env *environment) runCommand(command string, args ...string) (string, error) { + if env.getRuntimeGOOS() == windowsPlatform && !strings.HasSuffix(command, ".exe") { + command += ".exe" + } defer env.trace(time.Now(), "runCommand", append([]string{command}, args...)...) if cmd, ok := env.cmdCache.get(command); ok { command = cmd