From fc34637b27eb961e574bd7726016b0f77879087d Mon Sep 17 00:00:00 2001 From: graehl Date: Mon, 28 Jun 2010 18:39:46 +0000 Subject: shell escape empty arg git-svn-id: https://ws10smt.googlecode.com/svn/trunk@41 ec762483-ff6d-05da-a07a-a48fb63a330f --- vest/parallelize.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'vest') 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\""; -- cgit v1.2.3