mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 12:14:10 +00:00
3d4e133e77
parallel >= 20200822 uses /bin/echo to calculate the max allowed line
length. Patch it to a correct path, so that it doesn't (silently) fail
and fall back to a low value of 324.
Before:
$ parallel --max-line-length-allowed
324
After:
$ parallel --max-line-length-allowed
131063
Fixes: 16ca8725ff
("parallel: 20200722 -> 20200822")
18 lines
604 B
Diff
18 lines
604 B
Diff
Correct path to coreutils echo to fix parallel --max-line-length-allowed.
|
|
|
|
Author: Bjørn Forsman
|
|
|
|
diff --git a/src/parallel b/src/parallel
|
|
index a047fd94..9fc5f671 100755
|
|
--- a/src/parallel
|
|
+++ b/src/parallel
|
|
@@ -11580,7 +11580,7 @@ sub is_acceptable_command_line_length($$) {
|
|
$len += length $Global::parallel_env;
|
|
}
|
|
# Force using non-built-in command
|
|
- ::qqx("/bin/echo ".${string}x(($len-length "/bin/echo ")/length $string));
|
|
+ ::qqx("@coreutils@/bin/echo ".${string}x(($len-length "@coreutils@/bin/echo ")/length $string));
|
|
::debug("init", "$len=$? ");
|
|
return not $?;
|
|
}
|