diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index 2f7eeb2..d070f7e 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -12,6 +12,7 @@ import ( "path/filepath" "regexp" "strings" + "runtime" "github.com/go-git/go-billy/v5/helper/polyfill" "github.com/go-git/go-billy/v5/osfs" @@ -333,6 +334,15 @@ func (cr *containerReference) extractGithubEnv(env *map[string]string) common.Ex func (cr *containerReference) exec(cmd []string, env map[string]string) common.Executor { return func(ctx context.Context) error { logger := common.Logger(ctx) + // Fix slashes when running on Windows + if runtime.GOOS == "windows" { + var newCmd []string + for _, v := range cmd { + newCmd = append(newCmd, strings.ReplaceAll(v, `\`, `/`)) + } + cmd = newCmd + } + logger.Debugf("Exec command '%s'", cmd) isTerminal := term.IsTerminal(int(os.Stdout.Fd())) envList := make([]string, 0)