Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

Commit

Permalink
fix(windows): escape command percent signs
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
Tapppi authored and stevemao committed Jun 25, 2016
1 parent 600e031 commit 005b559
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Expand Up @@ -24,6 +24,13 @@ function gitRawCommits(options) {
'"<%- from ? [from, to].join("..") : to %>" '
)(options) + args.join(' ');

if (process.platform === 'win32') {
// Git format strings have percent signs in them
// On windows percent signs need to be doubled to escape them,
// so that they aren't used for variable expansion
cmd.replace(/%/g, '%%');
}

if (options.debug) {
options.debug('Your git-log command is:\n' + cmd);
}
Expand Down

0 comments on commit 005b559

Please sign in to comment.