mirror of
https://github.com/git/git.git
synced 2024-10-30 13:57:54 +01:00
Merge branch 'js/perl-path-workaround-in-tests'
* js/perl-path-workaround-in-tests: mingw: handle GITPERLLIB in t0021 in a Windows-compatible way
This commit is contained in:
commit
fac910641a
1 changed files with 16 additions and 1 deletions
|
@ -31,7 +31,22 @@
|
|||
#
|
||||
|
||||
use 5.008;
|
||||
use lib (split(/:/, $ENV{GITPERLLIB}));
|
||||
sub gitperllib {
|
||||
# Git assumes that all path lists are Unix-y colon-separated ones. But
|
||||
# when the Git for Windows executes the test suite, its MSYS2 Bash
|
||||
# calls git.exe, and colon-separated path lists are converted into
|
||||
# Windows-y semicolon-separated lists of *Windows* paths (which
|
||||
# naturally contain a colon after the drive letter, so splitting by
|
||||
# colons simply does not cut it).
|
||||
#
|
||||
# Detect semicolon-separated path list and handle them appropriately.
|
||||
|
||||
if ($ENV{GITPERLLIB} =~ /;/) {
|
||||
return split(/;/, $ENV{GITPERLLIB});
|
||||
}
|
||||
return split(/:/, $ENV{GITPERLLIB});
|
||||
}
|
||||
use lib (gitperllib());
|
||||
use strict;
|
||||
use warnings;
|
||||
use IO::File;
|
||||
|
|
Loading…
Reference in a new issue