summaryrefslogtreecommitdiffstats
path: root/perl-install/run_program.pm
diff options
context:
space:
mode:
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");