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() {
416
416
const fn = new AsyncFunction ( 'require' , 'github' , 'context' , script )
417
417
const result = await fn ( require , client , context )
418
418
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'
421
421
422
422
let output
423
423
424
424
switch ( encoding ) {
425
425
case 'json' :
426
- result = JSON . stringify ( result )
426
+ output = JSON . stringify ( result )
427
427
break
428
428
case 'string' :
429
- result = String ( result )
429
+ output = String ( result )
430
430
break
431
431
default :
432
432
throw new Error ( '"result-encoding" must be either "string" or "json"' )
433
433
}
434
434
435
- core . setOutput ( 'result' , result )
435
+ core . setOutput ( 'result' , output )
436
436
}
437
437
438
438
function handleError ( err ) {
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ async function main() {
19
19
const fn = new AsyncFunction ( 'require' , 'github' , 'context' , script )
20
20
const result = await fn ( require , client , context )
21
21
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'
24
24
25
25
let output
26
26
You can’t perform that action at this time.
0 commit comments