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 7:17 PM, Greg Wooledge <wool...@eeg.ccf.org> napisał(a): > On Wed, Apr 01, 2020 at 04:54:42PM +0000, 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 continue execution. > > > > https://mywiki.wooledge.org/BashPitfalls#pf27
script-local-variable-bug-workaround.sh
Description: application/shellscript