{"record":{"id":"fc5f004ab37fd358","repo":"jdx/mise","slug":"plugin-is-defined-in-p-which-overrides-the-glo","errorCode":null,"errorMessage":"{plugin} is defined in {p} which overrides the global config ({global})","messagePattern":"(.+?) is defined in (.+?) which overrides the global config \\((.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/cli/use.rs","lineNumber":437,"sourceCode":"            // Tool-level options cannot be represented in .tool-versions or idiomatic\n            // version files. Keep the selected directory, but write the hook to its\n            // default TOML config rather than unexpectedly selecting a TOML file above it.\n            path.set_file_name(&*env::MISE_DEFAULT_CONFIG_FILENAME);\n        }\n\n        config_file::parse_or_init(&path).await\n    }\n\n    async fn warn_if_hidden(&self, config: &Arc<Config>, global: &Path) {\n        let ts = ToolsetBuilder::new()\n            .build(config)\n            .await\n            .unwrap_or_default();\n        let warn = |targ: &ToolArg, p| {\n            let plugin = &targ.ba;\n            let p = display_path(p);\n            let global = display_path(global);\n            warn!(\"{plugin} is defined in {p} which overrides the global config ({global})\");\n        };\n        for target in &self.tools {\n            let targ = &target.tool;\n            if let Some(tv) = ts.versions.get(targ.ba.as_ref())\n                && let ToolSource::MiseToml(p) | ToolSource::ToolVersions(p) = &tv.source\n                && !file::same_file(p, global)\n                && !config::is_system_config(p)\n            {\n                warn(targ, p);\n            }\n        }\n    }\n\n    fn render_success_message(\n        &self,\n        cf: &dyn ConfigFile,\n        versions: &[ToolVersion],\n        remove: &[BackendArg],","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/use.rs#L419-L455","documentation":"`mise use` (warn_if_hidden) warns \"{plugin} is defined in {p} which overrides the global config ({global})\" when a tool you are setting is already defined in a local config file (mise.toml/.tool-versions) whose path differs from the global config. It flags that the local definition will shadow the global one, which can surprise users editing the \"wrong\" file.","triggerScenarios":"Running `mise use <tool>` where the resolved tool version's `ToolSource` is a local MiseToml/ToolVersions file and that file is not the same file as the global config (`!file::same_file(p, global)`).","commonSituations":"A project-level mise.toml pins a tool while the global config also defines it; user runs `mise use -g tool@x` expecting the change to take effect but a local file wins; confusion after cd-ing into a project with inherited configs.","solutions":["Edit the file that actually takes precedence (the local path printed in the warning) if you intended a project-local change.","Use `mise use -g` deliberately and remove/adjust the conflicting local pin if the global value should win.","Run `mise ls` to see which config defines each tool (`source` info).","Consolidate duplicate tool definitions into one config to stop the shadowing."],"exampleFix":"// before\n# ~/.config/mise/config.toml\n[tools]\nnode = \"20\"   # shadowed by project mise.toml pinning node = \"18\"\n// after\n# project mise.toml\n[tools]\nnode = \"20\"   # single source of truth; global pin removed","handlingStrategy":"validation","validationCode":"mise ls  # inspect each tool's source config file before running mise use","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the tool's `source` in `mise ls` to know which file wins.","Keep tool pins in one place: either global or per-project, not both.","Use `mise use -g` intentionally and clean up local duplicates afterwards."],"tags":["rust","cli","config","shadowing"],"backgroundTag":"conflicting-config-options","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}