Skip to content

Commit 54c5e44

Browse files
committed
use core.setOutput
1 parent 74b79b8 commit 54c5e44

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

dist/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ function run() {
9595
output = output.replace(/\n/g, '%0A');
9696
output = output.replace(/\r/g, '%0D');
9797
core.info(output);
98-
const setoutputCommand = `echo "diff=${output}" >> $GITHUB_OUTPUT`;
99-
exec.exec(setoutputCommand).catch(error => {
100-
core.setFailed(error.message);
101-
});
98+
core.setOutput("diff", output);
10299
});
103100
}
104101
function removeStarLines(inputString, lineBreak = '\n') {

src/main.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ async function run(): Promise<void> {
6565

6666
core.info(output)
6767

68-
const setoutputCommand = `echo "diff=${output}" >> $GITHUB_OUTPUT`
69-
exec.exec(setoutputCommand).catch(error => {
70-
core.setFailed(error.message)
71-
})
68+
core.setOutput("diff", output)
7269
}
7370

7471
function removeStarLines(inputString: string, lineBreak: string = '\n'): string {

0 commit comments

Comments
 (0)