bug-bash
[Top][All Lists]
Advanced

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

Re: local -r issue in conjunction with trap


From: Dale R. Worley
Subject: Re: local -r issue in conjunction with trap
Date: Sat, 16 Jul 2022 22:06:01 -0400

Robert Stoll <robert.stoll@tegonal.com> writes:
> test1 # works as exit happens outside of test1
> test2 # fails with ./src/test.sh: line 6: local: readonlyVar: readonly 
> variable

Beware that you haven't specified what you mean by "works" and "fails".
I assume from the context that "fails" means "produces an error
message", but it's much hard to guess what "works" means.  In general,
when reporting a problem, always explicitly answer "What do I expect to
happen?" and "What happens?".

Dale



reply via email to

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