Skip to content

Commit 99889c2

Browse files
committed
Fix result-enoding/encoding typo
1 parent 9abe67e commit 99889c2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

dist/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

438438
function handleError(err) {

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)