{"record":{"id":"64d9837f2f408595","repo":"jdx/mise","slug":"no-tasks-defined-in-but-found-non-executabl-64d983","errorCode":null,"errorMessage":"no tasks defined in {}, but found {} non-executable file(s) in {}.\nFiles must be executable to be detected as tasks.\n{}","messagePattern":"no tasks defined in (.+?), but found (.+?) non-executable file\\(s\\) in (.+?)\\.\nFiles must be executable to be detected as tasks\\.\n(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_list.rs","lineNumber":343,"sourceCode":"        if let Some(task) = make_task_executable(config, name, task_context).await? {\n            return Ok(Some(task));\n        }\n\n        // Check if there are non-executable files in task include directories\n        if let Some(cwd) = &*dirs::CWD {\n            let includes = config::task_includes_for_dir(cwd, &config.config_files)?;\n            let excludes = config::task_excludes_for_dir(cwd, &config.config_files)?;\n            let non_exec_files = find_non_executable_task_files(&includes, &excludes);\n            // The remedy differs by platform and `make_executable_hint` is the only thing that\n            // knows how, so it gets one file to name rather than the list. The count and the\n            // directories below still say how much is affected.\n            if let Some(first) = non_exec_files.first() {\n                let dirs_with_files: Vec<String> = includes\n                    .iter()\n                    .filter(|d| d.is_dir())\n                    .map(display_path)\n                    .collect();\n                bail!(\n                    \"no tasks defined in {}, but found {} non-executable file(s) in {}.\\n\\\n                        Files must be executable to be detected as tasks.\\n\\\n                        {}\",\n                    display_path(dirs::CWD.clone().unwrap_or_default()),\n                    non_exec_files.len(),\n                    dirs_with_files.join(\", \"),\n                    file::make_executable_hint(first),\n                );\n            }\n        }\n\n        bail!(\n            \"no tasks defined in {}. Are you in a project directory?\",\n            display_path(dirs::CWD.clone().unwrap_or_default())\n        );\n    }\n    if let Some(task) = make_task_executable(config, name, task_context).await? {\n        return Ok(Some(task));","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/task/task_list.rs#L325-L361","documentation":"No task matched, and the fallback scan of task include directories found files that look like tasks but lack the executable bit. mise only detects file-based tasks that are executable, so the message counts those files and includes the platform-appropriate chmod hint.","triggerScenarios":"Thrown at src/task/task_list.rs:343 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make the task file executable (chmod +x, or the hint shown on Windows)","Move tasks into a directory mise scans (e.g. mise-tasks/, .mise/tasks/)","Prefer defining tasks in mise.toml/tasks.toml instead of executable files"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}