Skip to content

Commit

Permalink
Avoid array quoting on error states in async_process_results
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mafredri committed Aug 6, 2018
1 parent 2fa0f6b commit 02d8636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion async.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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++ ))
Expand Down

0 comments on commit 02d8636

Please sign in to comment.