You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The failing ${1:?} expansion causes the shell to exit (in an interactive session it doesn't exit, but it does immediately terminate processing and return to the prompt, as if exiting). This prevents the function from being cached properly and, notably, suppresses the error message from being written to stderr.
Invoking the cached function in a subshell (i.e. ( "bc::orig::${func}" "${args[@]}" ) > "${cache}/out" 2> "${cache}/err" in bc::_write_cache) is sufficient to work-around this problem, but adding an extra subshell to every cache write would be an expensive solution.
The text was updated successfully, but these errors were encountered:
The failing
${1:?}
expansion causes the shell to exit (in an interactive session it doesn't exit, but it does immediately terminate processing and return to the prompt, as if exiting). This prevents the function from being cached properly and, notably, suppresses the error message from being written to stderr.Invoking the cached function in a subshell (i.e.
( "bc::orig::${func}" "${args[@]}" ) > "${cache}/out" 2> "${cache}/err"
inbc::_write_cache
) is sufficient to work-around this problem, but adding an extra subshell to every cache write would be an expensive solution.The text was updated successfully, but these errors were encountered: