On 1/4/23 1:21 AM, Carlos Prieto López wrote:
Bash Version: 5.1
Patch Level: 4
Release Status: release
Description:
Errors are ignored when a command with error is assigned to a
local variable on the same line of declaration.
This comes up often; just last month, in fact:
https://l
On Wed, Jan 04, 2023 at 12:21:27AM -0600, Carlos Prieto López wrote:
> Description:
> Errors are ignored when a command with error is assigned to a local
> variable on the same line of declaration.
>
> f(){
> return 1
> }
>
> g(){
> local v=`f`
> }
> g && echo g
> the output is 'g', but