mirror of
https://github.com/actions/github-script.git
synced 2025-12-09 00:26:20 +00:00
Encode result into output
This commit is contained in:
@@ -26,16 +26,16 @@ async function main() {
|
||||
|
||||
switch (encoding) {
|
||||
case 'json':
|
||||
result = JSON.stringify(result)
|
||||
output = JSON.stringify(result)
|
||||
break
|
||||
case 'string':
|
||||
result = String(result)
|
||||
output = String(result)
|
||||
break
|
||||
default:
|
||||
throw new Error('"result-encoding" must be either "string" or "json"')
|
||||
}
|
||||
|
||||
core.setOutput('result', result)
|
||||
core.setOutput('result', output)
|
||||
}
|
||||
|
||||
function handleError(err) {
|
||||
|
||||
Reference in New Issue
Block a user