jdx/mise · error

no tasks defined in , but found non-executable file(s) in…

Error message

no tasks defined in {}, but found {} non-executable file(s) in {}.
Files must be executable to be detected as tasks.
{}

What it means

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.

Solutions

  1. Make the task file executable (chmod +x, or the hint shown on Windows)
  2. Move tasks into a directory mise scans (e.g. mise-tasks/, .mise/tasks/)
  3. Prefer defining tasks in mise.toml/tasks.toml instead of executable files
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/task/task_list.rs:343 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/64d9837f2f408595. Report an issue: GitHub.

Appendix: source

Thrown at src/task/task_list.rs:343

        if let Some(task) = make_task_executable(config, name, task_context).await? {
            return Ok(Some(task));
        }

        // Check if there are non-executable files in task include directories
        if let Some(cwd) = &*dirs::CWD {
            let includes = config::task_includes_for_dir(cwd, &config.config_files)?;
            let excludes = config::task_excludes_for_dir(cwd, &config.config_files)?;
            let non_exec_files = find_non_executable_task_files(&includes, &excludes);
            // The remedy differs by platform and `make_executable_hint` is the only thing that
            // knows how, so it gets one file to name rather than the list. The count and the
            // directories below still say how much is affected.
            if let Some(first) = non_exec_files.first() {
                let dirs_with_files: Vec<String> = includes
                    .iter()
                    .filter(|d| d.is_dir())
                    .map(display_path)
                    .collect();
                bail!(
                    "no tasks defined in {}, but found {} non-executable file(s) in {}.\n\
                        Files must be executable to be detected as tasks.\n\
                        {}",
                    display_path(dirs::CWD.clone().unwrap_or_default()),
                    non_exec_files.len(),
                    dirs_with_files.join(", "),
                    file::make_executable_hint(first),
                );
            }
        }

        bail!(
            "no tasks defined in {}. Are you in a project directory?",
            display_path(dirs::CWD.clone().unwrap_or_default())
        );
    }
    if let Some(task) = make_task_executable(config, name, task_context).await? {
        return Ok(Some(task));

View on GitHub (pinned to 533346cc37)