Command to show in the UI should not be escaped, but the actual command must be

This commit is contained in:
Jamie Cameron
2022-07-10 16:51:57 -07:00
parent 48bb329a60
commit 13f7bf9621

View File

@ -21,10 +21,10 @@ local (@rv, @newpacks);
# Build the command to run
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
local $uicmd = "$apt_get_command -y ".($force ? " -f" : "")." install $update";
$update = join(" ", map { quotemeta($_) } split(/\s+/, $update));
$update =~ s/\\(-)|\\(.)/$1$2/g;
local $cmd = "$apt_get_command -y ".($force ? " -f" : "")." install $update";
print "<b>",&text('apt_install', "<tt>$cmd</tt>"),"</b><p>\n";
print "<b>",&text('apt_install', "<tt>".&html_escape($uicmd)."</tt>"),"</b><p>\n";
print "<pre>";
&additional_log('exec', undef, $cmd);