diff options
author | Kevin Ballard <kevin@sb.org> | 2014-07-13 19:08:15 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-08-21 19:06:21 -0700 |
commit | 9f725bee1f59df961e93e3d2392bc779281d7de7 (patch) | |
tree | b859c757b7c14e4fafb03fef990706e1c2a950b6 /env.h | |
parent | d0c85471b40fee548efc35a370f5d5c4b656f66a (diff) |
set: Print an error when setting `umask` to a bad value
Repurpose the ENV_INVALID return value for env_set(), which wasn't
currently used by anything. When a bad value is passed for the 'umask'
key, return ENV_INVALID to signal this and print a good error message
from the `set` builtin.
This makes `set umask foo` properly produce an error.
Diffstat (limited to 'env.h')
-rw-r--r-- | env.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -80,7 +80,7 @@ void env_init(const struct config_paths_t *paths = NULL); * ENV_PERM, can only be returned when setting as a user, e.g. ENV_USER is set. This means that the user tried to change a read-only variable. * ENV_SCOPE, the variable cannot be set in the given scope. This applies to readonly/electric variables set from the local or universal scopes, or set as exported. - * ENV_INVALID, the variable name or mode was invalid + * ENV_INVALID, the variable value was invalid. This applies only to special variables. */ int env_set(const wcstring &key, const wchar_t *val, env_mode_flags_t mode); |