mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 22:17:54 +00:00
parallel: --wd and --halt fix.
This commit is contained in:
parent
3d2ecc7651
commit
8966df3c0d
|
@ -2825,10 +2825,11 @@ sub reaper {
|
|||
$Global::timeoutq->update_delta_time($job->runtime());
|
||||
}
|
||||
# Force printing now if --halt forces us to exit
|
||||
my $print_now = $opt::halt and
|
||||
my $print_now =
|
||||
($opt::halt and
|
||||
(($opt::halt == 2 and $job->exitstatus())
|
||||
or
|
||||
($opt::halt == -2 and not $job->exitstatus()));
|
||||
($opt::halt == -2 and not $job->exitstatus())));
|
||||
if($opt::keeporder and not $print_now) {
|
||||
$job->print_earlier_jobs();
|
||||
} else {
|
||||
|
@ -6025,9 +6026,8 @@ sub sshlogin_wrap {
|
|||
if($opt::workdir) {
|
||||
# Create remote workdir if needed. Then cd to it.
|
||||
my $wd = $self->workdir();
|
||||
$pwd = qq{system("mkdir","-p","--","$wd") || chdir "$wd" ||}.
|
||||
$pwd = qq{system("mkdir","-p","--","$wd"); chdir "$wd" ||}.
|
||||
qq{print(STDERR "parallel: Cannot chdir to $wd\\n") && exit 255;};
|
||||
$command = "cd $wd;$command";
|
||||
}
|
||||
my ($csh_friendly,$envset,$bashfuncset) = env_as_eval();
|
||||
my $remote_command = $pwd.$envset.$bashfuncset.
|
||||
|
|
Loading…
Reference in a new issue