Skip to content

Commit

Permalink
Output error if error
Browse files Browse the repository at this point in the history
Output a result of `error` if an error is thrown.
  • Loading branch information
martincostello committed Jul 30, 2023
1 parent 58e3fef commit 7ebb533
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import * as core from '@actions/core';

import { Context } from '@actions/github/lib/context';
import { tryRebase } from './Rebaser';
import { RebaseResult, tryRebase } from './Rebaser';

export async function run(): Promise<void> {
try {
Expand All @@ -24,6 +24,7 @@ export async function run(): Promise<void> {
if (error instanceof Error) {
core.setFailed(error.message);
}
core.setOutput('result', RebaseResult.error.toString());
}
}

Expand Down

0 comments on commit 7ebb533

Please sign in to comment.