Re: errexit and local variable set by failing command

2020-04-01 Thread Chet Ramey
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

Re: errexit and local variable set by failing command

2020-04-01 Thread Krystian Wojtas
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

Re: errexit and local variable set by failing command

2020-04-01 Thread Greg Wooledge
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