Skip to content

Commit 6315975

Browse files
add --no-color flag if user didn't pass it
1 parent 642a6ef commit 6315975

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cli.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
return '"' + arg + '"'; // wrap parameters
4949
}).join(' ');
5050
} else {
51-
gitArgs = '-M -C --no-color HEAD';
51+
gitArgs = '-M -C HEAD';
52+
}
53+
54+
if (gitArgs.indexOf('--no-color') < 0) {
55+
gitArgs += '--no-color';
5256
}
5357

5458
var diffCommand = 'git diff ' + gitArgs;

0 commit comments

Comments
 (0)