We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1def34b commit 169062cCopy full SHA for 169062c
lib/index.js
@@ -1,13 +1,12 @@
1
import core from '@actions/core'
2
import { apply_patch } from "./runner.js";
3
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
-}
+const base_path = core.getInput('base_file_path');
+const patch_path = core.getInput('patch_file_path');
+const output_path = core.getInput('output_file_path');
+
+apply_patch(base_path, patch_path, output_path)
+ .then(() => core.setOutput('state', 'success'))
+ .catch(error => core.setFailed(error))
13
0 commit comments