Skip to content

Commit 169062c

Browse files
committed
refactor: remove top-level await
1 parent 1def34b commit 169062c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/index.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import core from '@actions/core'
22
import { apply_patch } from "./runner.js";
33

4-
try {
5-
const base_path = core.getInput('base_file_path');
6-
const patch_path = core.getInput('patch_file_path');
7-
const output_path = core.getInput('output_file_path');
8-
9-
await apply_patch(base_path, patch_path, output_path);
10-
} catch (error) {
11-
core.setFailed(error);
12-
}
4+
const base_path = core.getInput('base_file_path');
5+
const patch_path = core.getInput('patch_file_path');
6+
const output_path = core.getInput('output_file_path');
7+
8+
apply_patch(base_path, patch_path, output_path)
9+
.then(() => core.setOutput('state', 'success'))
10+
.catch(error => core.setFailed(error))
11+
1312

0 commit comments

Comments
 (0)