From 02d86361dfba0b1329756d26cb78e225212838e9 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Mon, 6 Aug 2018 17:43:23 +0300 Subject: [PATCH] Avoid array quoting on error states in async_process_results The way items were quoted on error states could result in zsh interpreting the content within double-quotes as multiple arguments to the callback function, breaking the 6-argument promise for certain outputs. --- async.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async.zsh b/async.zsh index d9fc38b..2b5dec5 100644 --- a/async.zsh +++ b/async.zsh @@ -248,7 +248,7 @@ async_process_results() { else # In case of corrupt data, invoke callback with *async* as job # name, non-zero exit status and an error message on stderr. - $callback "async" 1 "" 0 "$0:$LINENO: error: bad format, got ${#items} items (${(@q)items})" $has_next + $callback "async" 1 "" 0 "$0:$LINENO: error: bad format, got ${#items} items (${(q)items})" $has_next fi (( num_processed++ ))