From 693b2782b3c8b103bb81ad0d7df169859a5f453d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 27 Jan 2016 17:25:05 +0100 Subject: [PATCH] run_command(): encode arguments inside run_command() --- bin/fcscs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/fcscs b/bin/fcscs index 230d4bc..66c8410 100755 --- a/bin/fcscs +++ b/bin/fcscs @@ -459,7 +459,8 @@ sub run_command { # a working $$. no warnings; - system { $cmd->[0] } @{$cmd}; + my @cmd = map { $screen->encode($_) } @{$cmd}; + system { $cmd[0] } @cmd; }; if ($exit != 0) { my $msg; @@ -898,10 +899,7 @@ sub handler_url { $screen->debug('handler_url', "opening $match->{value}"); run_in_background($screen, sub { - my @cmd = map { $screen->encode($_) } ( - @{$config->{setting}{browser}}, - $match->{value}, - ); + my @cmd = ( @{$config->{setting}{browser}}, $match->{value} ); run_command($screen, $config, \@cmd); }); return; -- 2.45.2