From 7152f4f311a79a61d3e7e6baa5c003ea28108ce5 Mon Sep 17 00:00:00 2001 From: Hassan El Mghari Date: Mon, 13 Feb 2023 15:56:18 -0500 Subject: [PATCH] v1.1 --- index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 42a9c9b..856c1f9 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,6 @@ async function main() { ); process.exit(1); } - // Check to see if the user is in a git repo try { execSync("git rev-parse --is-inside-work-tree", { encoding: "utf8", @@ -63,14 +62,13 @@ async function main() { }, ]); - console.log("Confirmation message is: ", confirmationMessage); - - if (confirmationMessage === "n") { + if (confirmationMessage.useCommitMessage === "n") { console.log("▲ Commit message has not been commited.`"); process.exit(1); } execSync(`git commit -m "${aiCommitMessage}"`, { + stdio: "inherit", encoding: "utf8", }); }