From: Vincent Pit Date: Fri, 11 Nov 2011 18:44:47 +0000 (+0100) Subject: Preserve the PATH environment variable when running a sub-perl on cygwin X-Git-Tag: v0.11~13 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=295b02f98a874580b83b150d67bbe4be1a37f0b1;p=perl%2Fmodules%2Fautovivification.git Preserve the PATH environment variable when running a sub-perl on cygwin --- diff --git a/t/51-threads-teardown.t b/t/51-threads-teardown.t index a688df8..862717d 100644 --- a/t/51-threads-teardown.t +++ b/t/51-threads-teardown.t @@ -11,9 +11,10 @@ use Test::Leaner tests => 1; sub run_perl { my $code = shift; - my $SystemRoot = $ENV{SystemRoot}; + my ($SystemRoot, $PATH) = @ENV{qw}; local %ENV; $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot; + $ENV{PATH} = $PATH if $^O eq 'cygwin' and defined $PATH; system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code; }