Skip to content

Commit

Permalink
♻️ Log exceptions to console
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary authored Jul 5, 2022
1 parent d6f8ef9 commit fefefa2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,17 @@ export const run = async () => {
2
) + "\n"
);
execSync(`git config --global user.email "${commitEmail}"`);
execSync(`git config --global user.name "${commitUsername}"`);
execSync("git pull");
execSync("git add .");
execSync(`git commit -m "${commitMessage}"`);
execSync("git push");
try {
execSync(`git config --global user.email "${commitEmail}"`, { stdio: "inherit" });
execSync(`git config --global user.name "${commitUsername}"`, { stdio: "inherit" });
execSync("git pull", { stdio: "inherit" });
execSync("git add .", { stdio: "inherit" });
execSync(`git commit -m "${commitMessage}"`, { stdio: "inherit" });
execSync("git push", { stdio: "inherit" });
} catch (error) {
console.error(String(error));
throw new Error(error);
}
setOutput("number-of-notes", totalNotes);
};

Expand Down

0 comments on commit fefefa2

Please sign in to comment.