fix(windows): force the use of .exe

resolves 
This commit is contained in:
Jan De Dobbeleer 2021-12-03 21:48:17 +01:00 committed by Jan De Dobbeleer
parent 3a4e21c36d
commit f00f5f9cf7

View file

@ -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