fixed issue with windows using bash script
This commit is contained in:
@@ -310,7 +310,7 @@ func (c *Compiler) Compile(ctx context.Context, args Args) *engine.Spec {
|
||||
dst.Envs = environ.Combine(envs, dst.Envs)
|
||||
dst.Volumes = append(dst.Volumes, mount)
|
||||
dst.Labels = labels
|
||||
setupScript(src, dst, full)
|
||||
setupScript(src, dst, os)
|
||||
setupWorkdir(src, dst, full)
|
||||
spec.Steps = append(spec.Steps, dst)
|
||||
|
||||
|
||||
@@ -28,8 +28,9 @@ func setupScript(src *resource.Step, dst *engine.Step, os string) {
|
||||
// windows operating system.
|
||||
func setupScriptWindows(src *resource.Step, dst *engine.Step) {
|
||||
dst.Entrypoint = []string{"powershell", "-noprofile", "-noninteractive", "-command"}
|
||||
dst.Command = []string{"echo $DRONE_SCRIPT | iex"}
|
||||
dst.Command = []string{"echo $Env:DRONE_SCRIPT | iex"}
|
||||
dst.Envs["DRONE_SCRIPT"] = powershell.Script(src.Commands)
|
||||
dst.Envs["SHELL"] = "powershell.exe"
|
||||
}
|
||||
|
||||
// helper function configures the pipeline script for the
|
||||
|
||||
Reference in New Issue
Block a user