diff --git a/src/parallel b/src/parallel index 637af7cb..7002cdff 100755 --- a/src/parallel +++ b/src/parallel @@ -4340,6 +4340,9 @@ sub workdir { } } } + if($workdir eq "") { + $workdir = "."; + } } elsif($opt::workdir eq "...") { $workdir = ".parallel/tmp/" . ::hostname() . "-" . $$ . "-" . $self->seq(); diff --git a/testsuite/tests-to-run/parallel-local-ssh1.sh b/testsuite/tests-to-run/parallel-local-ssh1.sh index 57d596e5..0b091a28 100644 --- a/testsuite/tests-to-run/parallel-local-ssh1.sh +++ b/testsuite/tests-to-run/parallel-local-ssh1.sh @@ -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 diff --git a/testsuite/tests-to-run/parallel-local152.sh b/testsuite/tests-to-run/parallel-local152.sh index 7f503897..e5ff966c 100644 --- a/testsuite/tests-to-run/parallel-local152.sh +++ b/testsuite/tests-to-run/parallel-local152.sh @@ -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 diff --git a/testsuite/wanted-results/parallel-local-ssh1 b/testsuite/wanted-results/parallel-local-ssh1 index 2fa377d3..b834eaff 100644 --- a/testsuite/wanted-results/parallel-local-ssh1 +++ b/testsuite/wanted-results/parallel-local-ssh1 @@ -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 diff --git a/testsuite/wanted-results/parallel-local152 b/testsuite/wanted-results/parallel-local152 index ea582010..2b826376 100644 --- a/testsuite/wanted-results/parallel-local152 +++ b/testsuite/wanted-results/parallel-local152 @@ -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