From: Graham Knop Date: Thu, 31 Oct 2013 18:05:44 +0000 (-0400) Subject: don't output env vars that are already set X-Git-Tag: v2.000_000~42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=commitdiff_plain;h=f643299c81fd737426ee00cec6882f3ab0579811 don't output env vars that are already set --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 9943542..40fcf68 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -305,6 +305,10 @@ sub environment_vars_string_for { && ${$value->[0]} eq $name) { next; } + if (!ref $value + && $value eq $ENV{$name}) { + next; + } $out .= $self->$build_method($name, $value); } return $out;