On 4/1/20 1:21 PM, Krystian Wojtas wrote:
> Aha, already known. Thank you for link. I'll get familiar with other cases.
>
> I just figured out that it works as expected if local variable is firstly
> declared and then set.
That's because the exit status of a command consisting only of assignment
Aha, already known. Thank you for link. I'll get familiar with other cases.
I just figured out that it works as expected if local variable is firstly
declared and then set.
Pozdrawiam,
Krystian Wojtas
Sent with ProtonMail Secure Email.
‐‐‐ Original Message ‐‐‐
środa, kwiecień 1, 2020
On Wed, Apr 01, 2020 at 04:54:42PM +, Krystian Wojtas via Bug reports for
the GNU Bourne Again SHell wrote:
> Script has set errexit flag. It runs function. Function declares
> local variable and set it to output of run subcommand. Subcommand fails.
> Script does not care and continu
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-musl
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Linux bc55e8b47896 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri
Feb 28 13:42:26 UTC 2020 x86_64 Linux
Machi