We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ce7c497 + 1c510fb commit 3754890Copy full SHA for 3754890
lib/DiffHighlight.pm
@@ -4,6 +4,9 @@ use 5.008;
4
use warnings FATAL => 'all';
5
use strict;
6
use Encode;
7
+use File::Spec; # For devnull
8
+
9
+my $NULL = File::Spec->devnull(); # get correct value for unix/win
10
11
# Highlight by reversing foreground and background. You could do
12
# other things like bold or underline if you prefer.
@@ -88,7 +91,7 @@ sub highlight_stdin {
88
91
# fallback, which means we will work even if git can't be run.
89
92
sub color_config {
90
93
my ($key, $default) = @_;
- my $s = `git config --get-color $key 2>/dev/null`;
94
+ my $s = `git config --get-color $key 2>$NULL`;
95
return length($s) ? $s : $default;
96
}
97
0 commit comments