mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-21 23:11:17 -03:00
Display error message on set -e PROTECTED
Previously unsetting a variable would fail silently. Now sharing error printing code from regular `set PROTECTED` call.
This commit is contained in:
@@ -1248,7 +1248,7 @@ int env_remove(const wcstring &key, int var_mode) {
|
||||
int erased = 0;
|
||||
|
||||
if ((var_mode & ENV_USER) && is_read_only(key)) {
|
||||
return 2;
|
||||
return ENV_SCOPE;
|
||||
}
|
||||
|
||||
first_node = vars_stack().top.get();
|
||||
|
||||
Reference in New Issue
Block a user