-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set -u
is respected for var refs to arrays, unlike in bash
#1034
Comments
Part of #1034. It used to look like [ var ? ]:1: fatal: Undefined array 'preHooks' Now it looks like [ var 'hookSlice' at line 6 of [ stdin ] ]:1: fatal: Undefined array 'preHooks'
set -u
is respected for var refs to arrays, unlike in bash
Summarizing: https://oilshell.zulipchat.com/#narrow/stream/307442-nix/topic/var.20ref.20idiom I tested it out, and this rule where set -u is ignored only applies for arrays. It doesn't apply for regular string vars So 2 ways bash is inconsistent:
It is possible to hide it behind |
I think this was fixed along with #1884
|
Nix uses a lot of this, see
https://oilshell.zulipchat.com/#narrow/stream/121539-oil-dev/topic/Oil-Nix.20Meeting.3F
related to #881
Probably start
spec/nix-idioms.test.sh
The text was updated successfully, but these errors were encountered: