{"record":{"id":"e6bce6e30b1b4855","repo":"jdx/mise","slug":"pre-use-hook-is-not-implemented","errorCode":null,"errorMessage":"pre_use hook is not implemented","messagePattern":"pre_use hook is not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/vfox/src/hooks/pre_use.rs","lineNumber":26,"sourceCode":"#[allow(dead_code)]\n#[derive(Debug)]\npub(crate) struct PreUseContext {\n    pub installed_sdks: IndexMap<String, SdkInfo>,\n}\n\n#[derive(Debug)]\npub struct PreUseResponse {\n    pub version: Option<String>,\n}\n\nimpl Plugin {\n    pub async fn pre_use(&self, _vfox: &Vfox, _legacy_file: &Path) -> Result<PreUseResponse> {\n        debug!(\"[vfox:{}] pre_use\", self.name);\n        // let ctx = PreUseContext {\n        //     installed_sdks: vfox.list_installed_versions(&self.name)?,\n        // };\n\n        unimplemented!(\"pre_use hook is not implemented\");\n    }\n}\n","sourceCodeStart":8,"sourceCodeEnd":29,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/crates/vfox/src/hooks/pre_use.rs#L8-L29","documentation":"When a requested task name doesn't exist but other tasks do, mise builds a rich error listing similarly named commands and available tasks (append_available_tasks), suggesting the closest task and whether the user meant a mise command instead. It is the 'did you mean' variant of the not-found error.","triggerScenarios":"`mise run <name>` where <name> matches no task, tasks_for_error contains candidate tasks to suggest, and a similar command name may exist; raised from err_no_task via get_task_lists.","commonSituations":"Typos in task names (`mise run tesst` for `test`); task defined only in a subdirectory's config while running at the root; forgetting a task was renamed.","solutions":["Run the exact task name from the \"Did you mean one of these?\" list.","Run `mise tasks` to see all available tasks in the current project.","If the task lives in a subdirectory config, cd there or use the appropriate path-qualified task syntax."],"exampleFix":"// before\nmise run test-unit\n\n// after\nmise run test:unit   # exact name from suggestions","handlingStrategy":"try-catch","validationCode":"# Confirm the exact task name exists before invoking\nmise tasks ls | grep -qx \"$task\" || echo \"task $task not defined\"","typeGuard":null,"tryCatchPattern":"// Parse the suggestion list from the failure and retry with the exact name\nif (stderr.includes('Did you mean one of these?')) {\n  const candidates = stderr.split('  - ').slice(1).map(s => s.trim());\n}","preventionTips":["Use shell tab completion for mise task names.","Re-check task names after renames or moving tasks between config files.","Keep task names consistent across subproject mise.toml files."],"tags":["tasks","not-found","typo","cli"],"backgroundTag":"resource-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}