From 556e09d5b8683e9e01b645017a2943eaa683aa38 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 12 Jan 2004 09:35:24 +0000 Subject: don't print refs in log when output is redirected (nice patch from blino :) --- perl-install/run_program.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'perl-install/run_program.pm') diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index c080be7d7..eb6a0a533 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -42,6 +42,11 @@ sub raw { my ($options, $name, @args) = @_; my $root = $options->{root} || ''; my $str = ref($name) ? $name->[0] : $name; + + my ($stdout_raw, $stdout_mode, $stderr_raw, $stderr_mode); + ($stdout_mode, $stdout_raw, @args) = @args if $args[0] =~ /^>>?$/; + ($stderr_mode, $stderr_raw, @args) = @args if $args[0] =~ /^2>>?$/; + log::l("running: $str @args" . ($root ? " with root $root" : "")); return 1 if $root && $<; @@ -51,11 +56,6 @@ sub raw { require install_any; install_any::check_prog(ref($name) ? $name->[0] : $name); } - - - my ($stdout_raw, $stdout_mode, $stderr_raw, $stderr_mode); - ($stdout_mode, $stdout_raw, @args) = @args if $args[0] =~ /^>>?$/; - ($stderr_mode, $stderr_raw, @args) = @args if $args[0] =~ /^2>>?$/; $ENV{HOME} || $::isInstall or $ENV{HOME} = '/root'; my $stdout = $stdout_raw && (ref($stdout_raw) ? "$ENV{HOME}/tmp/.drakx-stdout.$$" : "$root$stdout_raw"); -- cgit v1.2.1