Fixed bug #40132: FreeBSD: --workdir . gives warning if . == $HOME.

This commit is contained in:
Ole Tange 2013-09-28 17:55:04 +02:00
parent 358b9091f6
commit 7ffba8f544
5 changed files with 14 additions and 2 deletions

View file

@ -4340,6 +4340,9 @@ sub workdir {
}
}
}
if($workdir eq "") {
$workdir = ".";
}
} elsif($opt::workdir eq "...") {
$workdir = ".parallel/tmp/" . ::hostname() . "-" . $$
. "-" . $self->seq();

View file

@ -21,4 +21,8 @@ echo '### bug #40002: --files and --nonall seem not to work together:'
echo '### bug #40001: --joblog and --nonall seem not to work together:'
parallel --joblog - --nonall -S lo,localhost true | wc -l
echo '### bug #40132: FreeBSD: --workdir . gives warning if . == $HOME'
cd && parallel --workdir . -S lo pwd ::: ""
EOF

View file

@ -2,8 +2,8 @@
echo "### test global config - must run alone so the global config does not confuse others"
echo /etc/parallel/config | sudo parallel "mkdir -p /etc/parallel; echo --tollef > "
parallel -k echo -- 1 2 3 ::: a b c
parallel -k --gnu echo ::: 1 2 3 -- a b c
stdout parallel -k echo -- 1 2 3 ::: a b c
stdout parallel -k --gnu echo ::: 1 2 3 -- a b c
echo --gnu > ~/.parallel/config
parallel -k echo ::: 1 2 3 -- a b c
parallel -k --gnu echo ::: 1 2 3 -- a b c

View file

@ -20,3 +20,5 @@ OK
1
### bug #40001: --joblog and --nonall seem not to work together:
3
### bug #40132: FreeBSD: --workdir . gives warning if . == $HOME
/home/tange

View file

@ -1,4 +1,7 @@
### test global config - must run alone so the global config does not confuse others
parallel: Warning: YOU ARE USING --tollef. IF THINGS ARE ACTING WEIRD USE --gnu.
parallel: Warning: --tollef is obsolete and will be retired 20140222.
parallel: Warning: See: http://lists.gnu.org/archive/html/parallel/2013-02/msg00018.html
1
2
3