|
From: | Laur Aliste |
Subject: | Re: Unsuccessful assignment of a readonly variable does not return 1 |
Date: | Mon, 12 Dec 2016 11:12:54 +0100 |
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 assignment of a variable j to return 1 as well, but it doesn't.
[Prev in Thread] | Current Thread | [Next in Thread] |