On 2/23/25 12:20 PM, Max Bowsher wrote:

Bash Version: 5.2
Patch Level: 37
Release Status: release

Description:

When using $BASH_COMMAND in an EXIT trap to tell the user what failed, I
came across a problem where errors in subshells would instead implicate the
command immediately before the subshell, instead of the subshell itself.

Thanks for the report. The subshell updates BASH_COMMAND, but not the
parent. It's an easy change to make.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to