We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70e17c0 commit 5e60e82Copy full SHA for 5e60e82
github.js
@@ -9,14 +9,17 @@ const {
9
checkIfBranchExists,
10
} = require("./index");
11
12
+
13
const commitCommand = "commit";
14
const branchCommand = "branch"
15
16
const appendLineToFile = (filename, line) => {
- fs.appendFile(filename, `${line}\n`, function (err) {
17
- if (err) throw err;
18
- console.log(`Saved data to ${filename}.`);
19
- });
+ try {
+ fs.appendFileSync(filename, `${line}\n`);
+ } catch (e) {
20
+ console.error(`Error appending line to file ${filename}: ${e.message}`);
21
+ throw e;
22
+ }
23
};
24
25
const writeResultToGithubOutputFile = (results) => {
0 commit comments