Skip to content

Commit a56c541

Browse files
authored
fix: [CI-13938]: action multiline output variables (#34)
1 parent 4801f2a commit a56c541

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

plugin/github/workflow.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,14 @@ func getOutputVariables(prevStepId, outputFile string, outputVars []string) step
124124
skip := len(outputFile) == 0 || len(outputVars) == 0
125125
cmd := ""
126126
for _, outputVar := range outputVars {
127-
cmd += fmt.Sprintf("print('%s'+'='+'${{ steps.%s.outputs.%s }}'); ", outputVar, prevStepId, outputVar)
127+
cmd += fmt.Sprintf("%s=${{ steps.%s.outputs.%s }}\n", outputVar, prevStepId, outputVar)
128128
}
129129

130-
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
131-
cmd = fmt.Sprintf("python3 -c \"%s\" > %s", cmd, outputFile)
132-
} else if runtime.GOOS == "windows" {
130+
if runtime.GOOS == "windows" {
133131
cmd = fmt.Sprintf("python -c \"%s\"", outputVarWinScript(
134132
outputVars, prevStepId, outputFile))
135133
} else {
136-
cmd = fmt.Sprintf("python -c \"%s\" > %s", cmd, outputFile)
134+
cmd = fmt.Sprintf("echo \"%s\" > %s", cmd, outputFile)
137135
}
138136

139137
s := step{

0 commit comments

Comments
 (0)