mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 03:57:27 +00:00
Encode result into output
This commit is contained in:
parent
622ce3121a
commit
9abe67e516
1 changed files with 3 additions and 3 deletions
|
|
@ -26,16 +26,16 @@ async function main() {
|
||||||
|
|
||||||
switch (encoding) {
|
switch (encoding) {
|
||||||
case 'json':
|
case 'json':
|
||||||
result = JSON.stringify(result)
|
output = JSON.stringify(result)
|
||||||
break
|
break
|
||||||
case 'string':
|
case 'string':
|
||||||
result = String(result)
|
output = String(result)
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
throw new Error('"result-encoding" must be either "string" or "json"')
|
throw new Error('"result-encoding" must be either "string" or "json"')
|
||||||
}
|
}
|
||||||
|
|
||||||
core.setOutput('result', result)
|
core.setOutput('result', output)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleError(err) {
|
function handleError(err) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue