diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-28 18:39:46 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-28 18:39:46 +0000 |
commit | 195b1ff9b5f4995b4a66f44222b7c43c889135c7 (patch) | |
tree | 905f6bf866dbcc7cbfb8b95cbc88bf934058de33 | |
parent | 0c2454039d3548c8c56be7f55c161827b935b001 (diff) |
shell escape empty arg
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@41 ec762483-ff6d-05da-a07a-a48fb63a330f
-rwxr-xr-x | vest/parallelize.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vest/parallelize.pl b/vest/parallelize.pl index 2fa318de..9d3f61c4 100755 --- a/vest/parallelize.pl +++ b/vest/parallelize.pl @@ -54,6 +54,7 @@ my $shell_escape_in_quote=qr.[\\"\$`!].; sub escape_shell { my ($arg)=@_; return undef unless defined $arg; + return '""' unless $arg; if ($arg =~ /$is_shell_special/) { $arg =~ s/($shell_escape_in_quote)/\\$1/g; return "\"$arg\""; |