parallel: Fixed bug #39507: --env does not support newlines in variables.

This commit is contained in:
Ole Tange 2013-07-17 11:33:19 +02:00
parent 56e5118535
commit 81b767d324

View file

@ -934,7 +934,8 @@ sub parse_options {
sub env_quote {
my $v = shift;
$v =~ s/([\\])/\\$1/g;
$v =~ s/([\[\] \#\'\n\&\<\>\(\)\;\{\}\t\"\$\`\*\174\!\?\~])/\\$1/g;
$v =~ s/([\[\] \#\'\&\<\>\(\)\;\{\}\t\"\$\`\*\174\!\?\~])/\\$1/g;
$v =~ s/\n/"\n"/g;
return $v;
}