File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -416,23 +416,23 @@ async function main() {
416416 const fn = new AsyncFunction ( 'require' , 'github' , 'context' , script )
417417 const result = await fn ( require , client , context )
418418
419- let encoding = core . getInput ( 'result-enoding ' )
420- encoding = encoding != null ? encoding : 'json'
419+ let encoding = core . getInput ( 'result-encoding ' )
420+ encoding = encoding ? encoding : 'json'
421421
422422 let output
423423
424424 switch ( encoding ) {
425425 case 'json' :
426- result = JSON . stringify ( result )
426+ output = JSON . stringify ( result )
427427 break
428428 case 'string' :
429- result = String ( result )
429+ output = String ( result )
430430 break
431431 default :
432432 throw new Error ( '"result-encoding" must be either "string" or "json"' )
433433 }
434434
435- core . setOutput ( 'result' , result )
435+ core . setOutput ( 'result' , output )
436436}
437437
438438function handleError ( err ) {
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ async function main() {
1919 const fn = new AsyncFunction ( 'require' , 'github' , 'context' , script )
2020 const result = await fn ( require , client , context )
2121
22- let encoding = core . getInput ( 'result-enoding ' )
23- encoding = encoding != null ? encoding : 'json'
22+ let encoding = core . getInput ( 'result-encoding ' )
23+ encoding = encoding ? encoding : 'json'
2424
2525 let output
2626
You can’t perform that action at this time.
0 commit comments