jdx/mise · error
Setting [{}] is not set
Error message
Setting [{}] is not set What it means
`mise settings get KEY` walks dotted key segments through the resolved settings table. If the key is a known setting (is_known_setting() checks it against the generated SETTINGS_META registry) but no value is present at that point in the table, mise reports 'Setting [KEY] is not set' — the setting is valid, just never configured (and no default is materialized into the table at that path).
Source
Thrown at src/cli/settings/get.rs:42
let settings = if self.local {
let partial = Settings::parse_settings_file(&config::local_toml_config_path())
.unwrap_or_default();
Settings::partial_as_dict(&partial)?
} else {
Settings::get().as_dict()?
};
let mut value = toml::Value::Table(settings);
let mut key = Some(self.setting.as_str());
while let Some(k) = key {
let k = k
.split_once('.')
.map(|(a, b)| (a, Some(b)))
.unwrap_or((k, None));
if let Some(v) = value.as_table().and_then(|t| t.get(k.0)) {
key = k.1;
value = v.clone()
} else if is_known_setting(&self.setting) {
bail!("Setting [{}] is not set", self.setting);
} else {
bail!("Unknown setting: {}", self.setting);
}
}
match value {
toml::Value::String(s) => miseprintln!("{s}"),
value => miseprintln!("{value}"),
}
Ok(())
}
}
fn is_known_setting(key: &str) -> bool {
if SETTINGS_META.contains_key(key) {
return true;
}
let prefix = format!("{key}.");View on GitHub (pinned to 6f52dcdf99)
Solutions
- Set it if you want a persisted value: `mise settings set KEY VALUE`
- See all settings and their current values: `mise settings ls`
- If you only needed the effective behavior, rely on the documented default instead of `settings get` output
Example fix
# before mise settings get python.compile # Setting [python.compile] is not set # after mise settings ls # inspect current values + defaults mise settings set python true # set it explicitly if needed
Defensive patterns
Strategy: validation
Validate before calling
# treat 'not set' as a distinct, expected outcome out=$(mise settings get "$key" 2>&1) || true case "$out" in *'is not set'*) echo "$key uses its built-in default";; *) echo "$key=$out";; esac
Type guard
setting_is_set() { mise settings get "$1" >/dev/null 2>&1; } Try / catch
Handle 'Setting [X] is not set' as the 'unset' answer in probes (distinguish it from 'Unknown setting' which is a hard typo), then apply the documented default in your logic.
Prevention
- Use `mise settings ls` to see which settings have stored values
- Don't assume `settings get` echoes defaults for every key
- Set optional settings explicitly if scripts depend on reading them back
When it happens
Trigger: Running `mise settings get some.setting` for a real setting that has never been set in any config and whose default is not stored in the settings table, e.g. checking an optional setting's state before first use.
Common situations: Scripts probing whether a setting was customized before overriding it; users expecting `get` to always print the effective default; querying nested dotted settings where only a parent table exists.
Related errors
- Unknown setting: {}
- Unknown setting: {}
- Environment variable {key} not found
- Environment variable {} not found
- {key} cannot be set in a config file: mise reads it before c
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/39b0057074b1445c.
Report an issue: GitHub.