mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
set: Only warn about uvar shadowing if the set succeeded
Otherwise there's really no point in doing so - we'd tell you that a universal $status is shadowing a global, but we haven't actually created one!
This commit is contained in:
@@ -905,3 +905,11 @@ echo $status
|
||||
set --query
|
||||
echo $status
|
||||
# CHECK: 255
|
||||
|
||||
set -U status
|
||||
# CHECKERR: set: Tried to modify the special variable 'status' with the wrong scope
|
||||
set -S status
|
||||
# CHECK: $status: set in global scope, unexported, with 1 elements
|
||||
# CHECK: Variable is read-only
|
||||
# CHECK: $status[1]: |2|
|
||||
|
||||
|
||||
Reference in New Issue
Block a user