{"record":{"id":"5256ea64df0526e1","repo":"jdx/mise","slug":"task-list-options-cannot-be-used-with-task-info","errorCode":null,"errorMessage":"task list options cannot be used with task info","messagePattern":"task list options cannot be used with task info","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/cli/tasks/mod.rs","lineNumber":69,"sourceCode":"        }\n    }\n}\n\nimpl Tasks {\n    pub async fn run(self) -> Result<()> {\n        let Self { command, task, ls } = self;\n        let cmd = match command {\n            Some(Commands::Ls(cmd)) => Commands::Ls(ls.merge(cmd)?),\n            Some(cmd) => {\n                if ls.has_options() {\n                    bail!(\"task list options cannot be used with subcommands\");\n                }\n                cmd\n            }\n            None => match task {\n                Some(task) => {\n                    if ls.has_non_json_options() {\n                        bail!(\"task list options cannot be used with task info\");\n                    }\n                    Commands::Info(info::TasksInfo {\n                        task,\n                        json: ls.json,\n                    })\n                }\n                None => Commands::Ls(ls),\n            },\n        };\n\n        cmd.run().await\n    }\n}\n","sourceCodeStart":51,"sourceCodeEnd":83,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/cli/tasks/mod.rs#L51-L83","documentation":"`mise tasks <task-name>` is sugar for `mise tasks info <task-name>`. Only `--json` may ride along (it maps to tasks info --json); any other list option (--hidden, --extended, --sort, ...) combined with a positional task name trips the guard in src/cli/tasks/mod.rs:69.","triggerScenarios":"`mise tasks --hidden build`, `mise tasks --extended build`, etc. — a positional task name plus any non-json tasks-ls option.","commonSituations":"Assuming --hidden/--all are needed to see a hidden task's info (they are not for `tasks info`); flag left over from a `mise tasks ls --hidden` invocation edited into an info call.","solutions":["Use the info form: `mise tasks info build` (hidden tasks included by name)","Only add `--json` when machine-readable output is wanted: `mise tasks --json build`","Remove listing-only options like --hidden/--extended/--sort from the invocation"],"exampleFix":"# before\n$ mise tasks --hidden _private_task\n# error: task list options cannot be used with task info\n\n# after\n$ mise tasks info _private_task","handlingStrategy":"validation","validationCode":"# explicit form avoids the ambiguity entirely\nmise tasks info build --json 2>/dev/null || mise tasks info build","typeGuard":null,"tryCatchPattern":"mise tasks \"$name\" || { echo \"use `mise tasks info $name`; only --json may accompany a task name\" >&2; exit 1; }","preventionTips":["Prefer `mise tasks info <name>` over the positional shorthand in scripts","Remember only --json is allowed with the shorthand form"],"tags":["mise","tasks","task-info","cli-flags","flag-conflict"],"backgroundTag":"mutually-exclusive-cli-flags","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}