fix: checkout container path should always use / (#1226)

Container.CopyDir is no longer working with `\` as destpath.
This commit is contained in:
ChristopherHX 2022-06-21 23:23:49 +02:00 committed by GitHub
parent de37f75077
commit f71f2778f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,7 @@ func (sar *stepActionRemote) main() common.Executor {
return nil
}
eval := sar.RunContext.NewExpressionEvaluator(ctx)
copyToPath := filepath.Join(sar.RunContext.Config.ContainerWorkdir(), eval.Interpolate(ctx, sar.Step.With["path"]))
copyToPath := path.Join(sar.RunContext.Config.ContainerWorkdir(), eval.Interpolate(ctx, sar.Step.With["path"]))
return sar.RunContext.JobContainer.CopyDir(copyToPath, sar.RunContext.Config.Workdir+string(filepath.Separator)+".", sar.RunContext.Config.UseGitIgnore)(ctx)
}