Skip to content

Commit bd25915

Browse files
committed
fix: xargs: command line cannot be assembled, too long
1 parent 339d62e commit bd25915

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mexec-exec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ main() {
7878
parse_arguments "$@"
7979

8080
if [[ -z "${local_file}" ]]; then
81-
kubectl get pod "${kgp_args[@]}" -o name | awk -F/ '{print $2}' | xargs -P "${parallel}" -I{} bash -c "kubectl exec ${keti_args[*]@Q} {} -- ${cmd[*]@Q} |& sed s/^/{}\ /g"
81+
kubectl get pod "${kgp_args[@]}" -o name | awk -F/ '{print $2}' | xargs -S10240 -P "${parallel}" -I{} bash -c "kubectl exec ${keti_args[*]@Q} {} -- ${cmd[*]@Q} |& sed s/^/{}\ /g"
8282
else
8383
if [[ ! -f "${local_file}" ]]; then
8484
errecho "Error: local file ${local_file} not found"

0 commit comments

Comments
 (0)