{"record":{"id":"c40903e53013e039","repo":"jdx/mise","slug":"unknown-command","errorCode":null,"errorMessage":"unknown command: {}","messagePattern":"unknown command: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_list.rs","lineNumber":267,"sourceCode":"async fn err_no_task(\n    config: &Arc<Config>,\n    name: &str,\n    task_context: Option<&TaskLoadContext>,\n) -> Result<Option<Task>> {\n    // Check early if the name looks like a mistyped CLI subcommand\n    let similar_cmds = suggest_similar_commands(name);\n    let (tasks_for_error, showing_all_tasks) = tasks_for_missing_task_error(config, name).await?;\n\n    if tasks_for_error.is_empty() {\n        // If the name matches a CLI subcommand closely, suggest that instead of\n        // the confusing \"no tasks defined\" message\n        if !similar_cmds.is_empty() {\n            let mut err_msg = format!(\"unknown command: {}\", style::ered(name));\n            err_msg.push_str(\"\\n\\nDid you mean:\");\n            for cmd_name in &similar_cmds {\n                err_msg.push_str(&format!(\"\\n  mise {cmd_name}\"));\n            }\n            bail!(err_msg);\n        }\n\n        // Check if there are any untrusted config files in the current directory\n        // that might contain tasks.\n        if let Some(cwd) = &*dirs::CWD {\n            use crate::config::config_file::{config_trust_root, is_trusted};\n            use crate::config::{config_files_in_dir, is_tool_versions_file};\n\n            // In safe mode, config is inert and trust is not required, so there\n            // are no untrusted configs to warn about.\n            let safe_mode = config::Settings::safe_mode();\n            let config_files = config_files_in_dir(cwd);\n            let untrusted_configs: Vec<_> = config_files\n                .iter()\n                .filter(|p| {\n                    !safe_mode\n                        && !is_tool_versions_file(p)\n                        && !is_trusted(&config_trust_root(p))","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/task/task_list.rs#L249-L285","documentation":"Error \"unknown command: {}\" thrown in jdx/mise.","triggerScenarios":"Thrown at src/task/task_list.rs:267 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the task name spelling with `mise tasks ls` and use an exact match.","If you meant a monorepo path, use the `//path:task` or `:task` form."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}