bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

5.2 fails to treat a missing conditional expression as an error of synta


From: Kerin Millar
Subject: 5.2 fails to treat a missing conditional expression as an error of syntax
Date: Fri, 16 Jun 2023 01:57:44 +0100

As below.

$ bash -c 'declare -p BASH_VERSION'
declare -- BASH_VERSION="5.2.15(1)-release"
$ bash -c '[[ ]]; echo fin'; echo $?
0

$ bash -c 'declare -p BASH_VERSION'
declare -- BASH_VERSION="5.1.16(1)-release"
$ bash -c '[[ ]]; echo fin'; echo $?
bash: -c: line 1: syntax error near `;'
bash: -c: line 1: `[[ ]]; echo fin'
2

The development branch behaves as 5.1 does. Being uncertain as to whether this 
is a result of the issue having been identified prior, I determined that it was 
worth reporting.

--
Kerin Millar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]