[libmoosex-has-sugar-perl] 57/120: sterilize_env.pl: Early bail if STERILIZE_TREE does not exist, use only defined Config properties that exist

Intrigeri intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to annotated tag 0.05070422-source
in repository libmoosex-has-sugar-perl.

commit 9c27a93daacdc5215c77d746f02fba6dbf1c0b2e
Author: Kent Fredric <kentfredric at gmail.com>
Date:   Wed Oct 30 07:57:00 2013 +1300

    sterilize_env.pl: Early bail if STERILIZE_TREE does not exist, use only defined Config properties that exist
---
 sterilize_env.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sterilize_env.pl b/sterilize_env.pl
index 7c8efd3..9e250c0 100644
--- a/sterilize_env.pl
+++ b/sterilize_env.pl
@@ -64,7 +64,10 @@ sub no_sterile_warning {
     diag("\e[35m PROCEEDING\e[0m");
   }
 }
-
+if ( not env_exists('STERILIZE_ENV') ) {
+  diag("\e[31STERILIZE_ENV is not set, skipping, because this is probably Travis's Default ( and unwanted ) target");
+  exit 0;
+}
 if ( not env_true('STERILIZE_ENV') ) {
   diag('STERILIZE_ENV unset or false, not sterilizing');
   exit 0;
@@ -91,8 +94,8 @@ if ( not env_true('TRAVIS') ) {
 
 use Config;
 
-my @all_libs  = map { $Config{$_} } grep { $_ =~ /(lib|arch)exp$/ } keys %Config;
-my @site_libs = map { $Config{$_} } grep { $_ =~ /site(lib|arch)exp$/ } keys %Config;
+my @all_libs  = grep { defined and length and -e } map { $Config{$_} } grep { $_ =~ /(lib|arch)exp$/ } keys %Config;
+my @site_libs = grep { defined and length and -e } map { $Config{$_} } grep { $_ =~ /site(lib|arch)exp$/ } keys %Config;
 
 for my $perl_ver ( keys %{$extra_sterile} ) {
   if ( env_is( 'TRAVIS_PERL_VERSION', $perl_ver ) ) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoosex-has-sugar-perl.git



More information about the Pkg-perl-cvs-commits mailing list