fixed issue with windows using bash script

This commit is contained in:
Brad Rydzewski
2019-11-01 09:28:42 -07:00
parent fcfc72f508
commit 2e1fc1a142
6 changed files with 57 additions and 12 deletions

View File

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