8000 Fix result-enoding/encoding typo · actions/github-script@cfd1b7c · GitHub
[go: up one dir, main page]

Skip to content

Commit cfd1b7c

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

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dist/index.js

Lines changed: 4 additions & 4 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')
419+
let encoding = core.getInput('result-encoding')
420420
encoding = encoding != null ? 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ 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')
22+
let encoding = core.getInput('result-encoding')
2323
encoding = encoding != null ? encoding : 'json'
2424

2525
let output

0 commit comments

Comments
 (0)
0