File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ sub boolean {
454
454
455
455
# Get the git config
456
456
sub git_config_raw {
457
- my $cmd = " git config --list" ;
457
+ my $cmd = " git config --list 2>&1 " ;
458
458
my @out = ` $cmd ` ;
459
459
460
460
return \@out ;
@@ -1030,11 +1030,17 @@ sub get_terminal_width {
1030
1030
1031
1031
sub show_debug_info {
1032
1032
my @less = get_less_charset();
1033
- my $git_ver = trim(` git --version` );
1033
+ my $git_ver = trim(` git --version 2>&1 ` );
1034
1034
$git_ver =~ s / [^\d .]// g ;
1035
1035
1036
+ if ($git_ver !~ / git/ ) {
1037
+ $git_ver = " Unknown" ;
1038
+ } else {
1039
+ $git_ver = " v" . $git_ver ;
1040
+ }
1041
+
1036
1042
print " Diff-so-fancy : v$VERSION \n " ;
1037
- print " Git : v $git_ver \n " ;
1043
+ print " Git : $git_ver \n " ;
1038
1044
print " Perl : $^V\n " ;
1039
1045
print " \n " ;
1040
1046
You can’t perform that action at this time.
0 commit comments