# HG changeset patch # User Augie Fackler # Date 1601392269 14400 # Node ID 2ea29b487b06c5f0fe66fbd429dbbf1892836b2f # Parent 1944a98a677488aa1dac3f6f23e8f395127c7710 zsh: update async to 1.8.5 diff --git a/.zfun/async b/.zfun/async --- a/.zfun/async +++ b/.zfun/async @@ -3,12 +3,12 @@ # # zsh-async # -# version: v1.8.4 +# version: v1.8.5 # author: Mathias Fredriksson # url: https://github.com/mafredri/zsh-async # -typeset -g ASYNC_VERSION=1.8.4 +typeset -g ASYNC_VERSION=1.8.5 # Produce debug output from zsh-async when set to 1. typeset -g ASYNC_DEBUG=${ASYNC_DEBUG:-0} @@ -561,7 +561,11 @@ async_start_worker() { # worker. # See https://github.com/mafredri/zsh-async/issues/35. integer errfd=-1 - exec {errfd}>&2 + + # Redirect of errfd is broken on zsh 5.0.2. + if is-at-least 5.0.8; then + exec {errfd}>&2 + fi # Make sure async worker is started without xtrace # (the trace output interferes with the worker). @@ -570,12 +574,16 @@ async_start_worker() { unsetopt xtrace } - zpty -b $worker _async_worker -p $$ $args 2>&$errfd + if (( errfd != -1 )); then + zpty -b $worker _async_worker -p $$ $args 2>&$errfd + else + zpty -b $worker _async_worker -p $$ $args + fi local ret=$? # Re-enable it if it was enabled, for debugging. (( has_xtrace )) && setopt xtrace - exec {errfd}>& - + (( errfd != -1 )) && exec {errfd}>& - if (( ret )); then async_stop_worker $worker