Skip to content
Permalink
Browse files Browse the repository at this point in the history
Command to show in the UI should not be escaped, but the actual comma…
…nd must be
  • Loading branch information
jcameron committed Jul 10, 2022
1 parent 48bb329 commit 13f7bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions software/apt-lib.pl
Expand Up @@ -21,10 +21,10 @@ sub update_system_install

# 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);

Expand Down

1 comment on commit 13f7bf9

@AkbarTrilaksana
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Please sign in to comment.