Skip to content

Commit

Permalink
fix(commit): does not try to escape backticks on Windows
Browse files Browse the repository at this point in the history
fixes previous commit, which should only have applied to *nix

Closes #105
  • Loading branch information
Patrick McElhaney authored and Patrick McElhaney committed Mar 30, 2016
1 parent 804c9a3 commit 5f7737f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/git/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ function commit(sh, repoPath, message, options, done) {

var alreadyEnded = false;
let dedentedMessage = dedent(message);
let escapedMessage = dedentedMessage.replace(/"/g, '\\"').replace(/`/g, '\\`');
let escapedMessage = dedentedMessage.replace(/"/g, '\\"');
let operatingSystemNormalizedMessage;
// On windows we must use an array in gulp-git instead of a string because
// command line parsing works differently
if(os.platform()=="win32") {
operatingSystemNormalizedMessage = escapedMessage.split(/\r?\n/);
} else {
operatingSystemNormalizedMessage = escapedMessage;
operatingSystemNormalizedMessage = escapedMessage.replace(/`/g, '\\`');
}

// Get a gulp stream based off the config
Expand Down

0 comments on commit 5f7737f

Please sign in to comment.