File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
build-tools-internal/src/main/groovy Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -142,18 +142,17 @@ buildScan {
142
142
// Add a build annotation
143
143
// See: https://buildkite.com/docs/agent/v3/cli-annotate
144
144
def body = """ <div class="mb3"><span class="p1 border rounded">${ System.getenv('BUILDKITE_LABEL')} </span> :gradle: ${ result.failure ? 'failed' : 'successful'} build: <a href="${ scan.buildScanUri} "><code>gradle ${ gradle.startParameter.taskNames.join(' ')} </code></a></div>"""
145
- new ProcessBuilder (
145
+ def process = [
146
146
' buildkite-agent' ,
147
147
' annotate' ,
148
148
' --context' ,
149
149
result. failure ? ' gradle-build-scans-failed' : ' gradle-build-scans' ,
150
150
' --append' ,
151
151
' --style' ,
152
- result. failure ? ' error' : ' info' ,
153
- body
154
- )
155
- .start()
156
- .waitFor()
152
+ result. failure ? ' error' : ' info'
153
+ ]. execute()
154
+ process. withWriter { it. write(body) } // passing the body in as an argument has issues on Windows, so let's use stdin of the process instead
155
+ process. waitFor()
157
156
}
158
157
}
159
158
} else {
You can’t perform that action at this time.
0 commit comments