diff --git a/dist/index.js b/dist/index.js index 39309cf..e20bc21 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1518,9 +1518,13 @@ const toUrlFormat = (item) => { const exec = (cmd, args = []) => new Promise((resolve, reject) => { - const app = spawn(cmd, args, { stdio: "inherit" }); + const app = spawn(cmd, args, { stdio: "pipe" }); + let stdout = ""; + app.stdout.on("data", (data) => { + stdout = data; + }); app.on("close", (code) => { - if (code !== 0) { + if (code !== 0 && !stdout.includes("nothing to commit")) { err = new Error(`Invalid status code: ${code}`); err.code = code; return reject(err); diff --git a/index.js b/index.js index d60f26b..b27e99b 100644 --- a/index.js +++ b/index.js @@ -43,9 +43,13 @@ const toUrlFormat = (item) => { const exec = (cmd, args = []) => new Promise((resolve, reject) => { - const app = spawn(cmd, args, { stdio: "inherit" }); + const app = spawn(cmd, args, { stdio: "pipe" }); + let stdout = ""; + app.stdout.on("data", (data) => { + stdout = data; + }); app.on("close", (code) => { - if (code !== 0) { + if (code !== 0 && !stdout.includes("nothing to commit")) { err = new Error(`Invalid status code: ${code}`); err.code = code; return reject(err);