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.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index 7e91437e7..593b270d8 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -13,6 +13,9 @@ sub rooted {
my ($root, $name, @args) = @_;
my $str = ref $name ? $name->[0] : $name;
log::l("running: $str @args" . ($root ? " with root $root" : ""));
+
+ return 1 if $root && $<;
+
$root ? $root .= '/' : ($root = '');
fork and wait, return $? == 0;