Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -Wall
uname output: Linux p14s 6.9.12-amd64 #1 SMP PREEMPT_DYNAM
Hi,
is it accepted behavior for a failing assignment of a readonly variable to
return successfully?
See following code:
fail() {
return 1
}
o() {
local i j
i="$(fail)" || echo "i init failed"
readonly j="$(fail)" || echo "j init failed" # this echo is not
executed
}
Expected
Forgot to add: GNU bash, version *4.4.5(1)-release* (x86_64-pc-linux-gnu),
running on Debian testing.
On Mon, Dec 12, 2016 at 11:11 AM, Laur Aliste wrote:
>
> Hi,
> is it accepted behavior for a failing assignment of a readonly variable to
> return successfully?
>
> See follow
args expanded in arr declar: '${i[*]}'"
echo "args in an arr: '${j[*]}'"
}
$ o "a b c"
passed args expanded in arr declar: ''
args in an arr: ''
Platform:
Linux 8570w 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64
GNU/Linux
Is this a feature or a bug?
Thanks in advance,
Laur Aliste