diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-01-12 09:35:24 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-01-12 09:35:24 +0000 |
commit | 556e09d5b8683e9e01b645017a2943eaa683aa38 (patch) | |
tree | 673847ff582c1d298d6831504109ef974c679260 | |
parent | bcf699d2ec99528715a45bdf5e40b0896c383cc3 (diff) | |
download | drakx-556e09d5b8683e9e01b645017a2943eaa683aa38.tar drakx-556e09d5b8683e9e01b645017a2943eaa683aa38.tar.gz drakx-556e09d5b8683e9e01b645017a2943eaa683aa38.tar.bz2 drakx-556e09d5b8683e9e01b645017a2943eaa683aa38.tar.xz drakx-556e09d5b8683e9e01b645017a2943eaa683aa38.zip |
don't print refs in log when output is redirected
(nice patch from blino :)
-rw-r--r-- | perl-install/run_program.pm | 10 |
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"); |