mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
Fixed bug #47608: parallel --nonall -S lo 'echo ::: ' blocks.
This commit is contained in:
parent
38445ee49e
commit
4a1abba854
|
@ -1031,11 +1031,13 @@ sub parse_options {
|
|||
$opt::compress_program ||= $compress;
|
||||
$opt::decompress_program ||= $decompress;
|
||||
}
|
||||
if(defined $opt::nonall
|
||||
and not grep /\Q$Global::arg_sep\E|\Q$Global::arg_sep\E/, @ARGV) {
|
||||
if(defined $opt::nonall) {
|
||||
# Append a dummy empty argument if there are no arguments
|
||||
# on the command line to avoid reading from STDIN.
|
||||
# arg_sep = random 50 char
|
||||
# \0 => nothing (not the empty string)
|
||||
$Global::arg_sep = join "",
|
||||
map { (0..9,"a".."z","A".."Z")[rand(62)] } (1..50);
|
||||
push @ARGV, $Global::arg_sep, "\0";
|
||||
}
|
||||
if(defined $opt::tty) {
|
||||
|
|
|
@ -74,4 +74,7 @@ echo '### bug #45907: --header : + --return {header}'
|
|||
ppar --header : -S parallel@lo --return {G} --cleanup echo {G} '>' {G} ::: G returnfile45907;
|
||||
ls returnfile45907
|
||||
|
||||
echo "### bug #47608: parallel --nonall -S lo 'echo ::: ' blocks"
|
||||
parallel --nonall -S lo 'echo ::: '
|
||||
|
||||
EOF
|
||||
|
|
|
@ -113,3 +113,7 @@ echo '### bug #45907: --header : + --return {header}'
|
|||
### bug #45907: --header : + --return {header}
|
||||
rm returnfile45907; ppar --header : -S parallel@lo --return {G} --cleanup echo {G} '>' {G} ::: G returnfile45907; ls returnfile45907
|
||||
returnfile45907
|
||||
echo "### bug #47608: parallel --nonall -S lo 'echo ::: ' blocks"
|
||||
### bug #47608: parallel --nonall -S lo 'echo ::: ' blocks
|
||||
parallel --nonall -S lo 'echo ::: '
|
||||
:::
|
||||
|
|
Loading…
Reference in a new issue