diff --git a/PVE/Report.pm b/PVE/Report.pm index b3373832..6037ba9d 100644 --- a/PVE/Report.pm +++ b/PVE/Report.pm @@ -5,9 +5,6 @@ use warnings; use PVE::Tools; -$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; - -my $cmd_timeout = 10; # generous timeout my $init_report_cmds = sub { # NOTE: always add new sections to the report_order array! @@ -136,6 +133,9 @@ sub generate { $report .= shift . "\n"; }; + local $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; + my $cmd_timeout = 10; # generous timeout + my $run_cmd_params = { outfunc => $record_output, errfunc => $record_output,