parallel: $PARALLEL_HOME will be created if it does not exist.

parallel: Fixed bug #62311: --pipepart + ::: fail.
This commit is contained in:
Ole Tange 2022-07-02 01:27:36 +08:00
parent 42cc048154
commit 60b88c9f3d

View file

@ -179,7 +179,10 @@ sub pipepart_setup() {
int($size / max_jobs_running() /
-multiply_binary_prefix($opt::blocksize));
}
@Global::cat_prepends = map { pipe_part_files($_) } @opt::a;
@Global::cat_prepends = (map { pipe_part_files($_) }
# ::: are put into files and given a filehandle
# ignore these and only keep the filenames.
grep { ! fileno $_ } @opt::a);
# Unget the empty arg as many times as there are parts
$Global::JobQueue->{'commandlinequeue'}{'arg_queue'}->unget(
map { [Arg->new("\0noarg")] } @Global::cat_prepends
@ -2781,6 +2784,8 @@ sub init_globals() {
}
# no warnings to allow for undefined $XDG_*
no warnings 'uninitialized';
# If $PARALLEL_HOME is set, but does not exist, try making it.
eval { File::Path::mkpath($ENV{'PARALLEL_HOME'}); };
# $xdg_config_home is needed to make env_parallel.fish stop complaining
my $xdg_config_home = $ENV{'XDG_CONFIG_HOME'};
# config_dirs = $PARALLEL_HOME, $XDG_CONFIG_HOME/parallel,