summaryrefslogtreecommitdiffstats
path: root/perl-install/run_program.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-12 09:35:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-12 09:35:24 +0000
commit556e09d5b8683e9e01b645017a2943eaa683aa38 (patch)
tree673847ff582c1d298d6831504109ef974c679260 /perl-install/run_program.pm
parentbcf699d2ec99528715a45bdf5e40b0896c383cc3 (diff)
downloaddrakx-backup-do-not-use-556e09d5b8683e9e01b645017a2943eaa683aa38.tar
drakx-backup-do-not-use-556e09d5b8683e9e01b645017a2943eaa683aa38.tar.gz
drakx-backup-do-not-use-556e09d5b8683e9e01b645017a2943eaa683aa38.tar.bz2
drakx-backup-do-not-use-556e09d5b8683e9e01b645017a2943eaa683aa38.tar.xz
drakx-backup-do-not-use-556e09d5b8683e9e01b645017a2943eaa683aa38.zip
don't print refs in log when output is redirected
(nice patch from blino :)
Diffstat (limited to 'perl-install/run_program.pm')
-rw-r--r--perl-install/run_program.pm10
1 files changed, 5 insertions, 5 deletions
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");