Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored Jul 18, 2022
1 parent 40fa359 commit e74b33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipeline/backend/docker/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ func toConfig(proc *types.Step) *container.Config {
proc.Environment["HOME"] = "c:\\root"
proc.Environment["SHELL"] = "powershell.exe"
proc.Entrypoint = []string{"powershell", "-noprofile", "-noninteractive", "-command"}
proc.Commands = []string{"[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Env:CI_SCRIPT)) | iex"}
config.Cmd = []string{"[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Env:CI_SCRIPT)) | iex"}
} else {
proc.Environment["CI_SCRIPT"] = generateScriptPosix(proc.Commands)
proc.Environment["HOME"] = "/root"
proc.Environment["SHELL"] = "/bin/sh"
proc.Entrypoint = []string{"/bin/sh", "-c"}
proc.Commands = []string{"echo $CI_SCRIPT | base64 -d | /bin/sh -e"}
config.Cmd = []string{"echo $CI_SCRIPT | base64 -d | /bin/sh -e"}
}
}

Expand Down

0 comments on commit e74b33a

Please sign in to comment.