Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Commit

Permalink
default to be a little noisier
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Oct 8, 2012
1 parent 4ed8eb0 commit 52fd2d8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Alien/Base/ModuleBuild.pm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ sub alien_check_installed_version {
my $self = shift;
my $command = $self->alien_version_check;

my %result = $self->do_system($command);
my %result = $self->do_system($command, {verbose => 0});
my $version = $result{stdout} || 0;

return $version;
Expand Down Expand Up @@ -345,7 +345,7 @@ sub alien_build {

my %result = $self->do_system( $command );
unless ($result{success}) {
carp "External command ($command) failed! Error: $?\n";
carp "External command ($result{command}) failed! Error: $?\n";
return 0;
}
}
Expand All @@ -357,6 +357,9 @@ sub alien_build {
# futher it either captures or tees depending on the value of $Verbose
sub do_system {
my $self = shift;
my $opts = ref $_[-1] ? pop : { verbose => 1 };

my $verbose = $Verbose || $opts->{verbose};

# prevent build process from cwd-ing from underneath us
local $CWD;
Expand All @@ -365,7 +368,7 @@ sub do_system {
my @args = map { $self->alien_interpolate($_) } @_;

my ($out, $err, $success) =
$Verbose
$verbose
? tee { $self->SUPER::do_system(@args) }
: capture { $self->SUPER::do_system(@args) }
;
Expand Down

0 comments on commit 52fd2d8

Please sign in to comment.