From 173226bdf0c47b2a947a31f1fa455356a3ad9eab Mon Sep 17 00:00:00 2001 From: Richard Kotze Date: Fri, 16 Oct 2020 01:04:16 +0100 Subject: [PATCH] Fix issue of adding co-author Double escape with backslash fixes params issue See issue post on stack overflow: https://stackoverflow.com/questions/64344898/cant-pass-right-number-of-args-via-nodejs-spawnsync #44 --- src/git/commands.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/git/commands.js b/src/git/commands.js index ccb3c03..ae6efb9 100644 --- a/src/git/commands.js +++ b/src/git/commands.js @@ -86,9 +86,7 @@ async function getRepoAuthors() { } function addRepoAuthor({ commandKey, name, email }) { - return handleResponse( - silentRun(`npx git add-coauthor ${commandKey} "${name}" ${email}`) - ); + return silentRun(`npx git add-coauthor ${commandKey} \\"${name}\\" ${email}`); } function setCurrent(mobList) {