jdx/mise · error

failed to parse registry option

Error message

failed to parse registry option {k} as a TOML value: {e}

What it means

Mise detects file-based tasks only when the files are executable. When no tasks are defined and mise finds non-executable candidate files in the task include directories, it raises this error with a count, the directories, and an executable-bit hint (file::make_executable_hint).

Solutions

  1. Make the task files executable: chmod +x on the files in your tasks directory (see the hint in the error).
  2. Set the file executable in git so fresh clones keep the bit: git update-index --chmod=+x tasks/mytask.
  3. Convert the scripts to TOML-defined tasks ([tasks.x] in mise.toml) which don't need the exec bit.

Example fix

// before
-rw-r--r-- mise/tasks/build

// after
chmod +x mise/tasks/build
# -rwxr-xr-x mise/tasks/build
Defensive patterns

Strategy: validation

Validate before calling

# Ensure all file tasks are executable
find mise/tasks -type f ! -perm -u+x -exec chmod +x {} +

Prevention

When it happens

Trigger: `mise run <name>` (or task listing) in a project using file tasks (e.g. mise/tasks/) where the script files exist but lack the executable bit, so they are not registered as tasks.

Common situations: Cloning a repo on a filesystem that drops the exec bit (FAT/exFAT, Windows checkouts); files added via a tool or archive that didn't preserve permissions; forgetting chmod +x after creating a task script.

Understand the failure class

Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.

Related errors


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

Appendix: source

Thrown at src/registry.rs:755

    pub(crate) fn ba(&self) -> Option<BackendArg> {
        self.backends()
            .first()
            .map(|f| BackendArg::new(self.short.to_string(), Some(f.to_string())))
    }

    /// Get RegistryBackend for a specific full backend string
    pub(crate) fn get_backend(&self, full: &str) -> Option<&RegistryBackend> {
        self.backends.iter().find(|rb| rb.full == full)
    }

    /// Get options for a specific backend
    pub(crate) fn backend_options(&self, full: &str) -> ToolVersionOptions {
        let mut opts = IndexMap::new();

        if let Some(backend) = self.get_backend(full) {
            for (k, v) in backend.options {
                let value = v.parse::<toml::Value>().unwrap_or_else(|e| {
                    panic!("failed to parse registry option {k} as a TOML value: {e}")
                });
                opts.insert(k.to_string(), value);
            }
        }

        ToolVersionOptions {
            opts: RawBackendOptions::from(opts),
            ..Default::default()
        }
    }

    pub(crate) fn version_order(&self, full: &str) -> Option<VersionOrder> {
        matches!(
            BackendType::guess(full),
            BackendType::Aqua
                | BackendType::Forgejo
                | BackendType::Github
                | BackendType::Gitlab

View on GitHub (pinned to 533346cc37)