Skip to content

Commit

Permalink
Fix issue of adding co-author
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rkotze committed Oct 16, 2020
1 parent 7feb106 commit 173226b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/git/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 173226b

Please sign in to comment.