On 10/12/20 1:23 AM, Martin Schulte wrote:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wall 
> -Wno-parentheses -Wno-format-sec$
> uname output: Linux t1 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) 
> x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
> 
> Bash Version: 5.0
> Patch Level: 3
> Release Status: release
> 
> Description:
> 
> It looks as if a bad substitution detected inside a case of if continues the 
> script flow immediately after the conditional statement skipping the 
> remaining statements inside the conditional. Please take a look into section 
> "Repeat-By:".

In general, variable expansion errors cause posix-mode shells to exit and
bash default mode shells to abort execution of the current command and
return to the top level, whether that is the command line or the next
command in the script. This aborts lists and other compound commands.
Bash has always behaved this way.

However, invalid parameter transformation operators are not considered
fatal errors, even in posix mode. Maybe they should be.

Chet
-- 
``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