Skip to content

Commit

Permalink
Ensure empty git config on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ferki committed Jan 20, 2025
1 parent 39f26af commit 67fc64b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t/scm/git.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use Test::More;
use Test::Warnings;
use Test::Exception;

use English qw(-no_match_vars);
use File::Spec;
use File::Temp qw(tempdir);
use Rex::Commands;
Expand All @@ -27,9 +28,11 @@ else {
plan skip_all => 'Can not find git command';
}

my $empty_config_file = $OSNAME eq 'MSWin32' ? q() : File::Spec->devnull();

my $git_environment = {
GIT_CONFIG_GLOBAL => File::Spec->devnull(),
GIT_CONFIG_SYSTEM => File::Spec->devnull(),
GIT_CONFIG_GLOBAL => $empty_config_file,
GIT_CONFIG_SYSTEM => $empty_config_file,
};

ok( $git, "Found git command at $git" );
Expand Down

0 comments on commit 67fc64b

Please sign in to comment.