From: Vincent Pit Date: Fri, 2 Nov 2012 12:40:37 +0000 (-0200) Subject: Preserve the PATH environment variable when running a sub-perl on cygwin X-Git-Tag: v0.13~28 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=012106b3a55d19d29e462556e2b5a62529275e59 Preserve the PATH environment variable when running a sub-perl on cygwin --- diff --git a/t/31-threads-teardown.t b/t/31-threads-teardown.t index c15ebec..e636acd 100644 --- a/t/31-threads-teardown.t +++ b/t/31-threads-teardown.t @@ -11,9 +11,10 @@ use Test::More 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; }