jdx/mise · error

failed to absolutize path

Error message

failed to absolutize path

What it means

Error "failed to absolutize path" thrown in jdx/mise.

Source

Thrown at src/toolset/tool_version.rs:216

            return p.clone();
        }
        let pathname = match &self.request {
            ToolRequest::Path { path: p, .. } => p.to_string_lossy().to_string(),
            _ => self.tv_pathname(),
        };
        let path = self.ba().installs_path.join(&pathname);

        // handle non-symlinks on windows
        // TODO: make this a utility function in xx
        #[cfg(windows)]
        if path.is_file()
            && let Ok(p) = file::read_to_string(&path).map(PathBuf::from)
        {
            let path = self.ba().installs_path.join(p);
            if path.exists() {
                return path
                    .absolutize()
                    .expect("failed to absolutize path")
                    .to_path_buf();
            }
        }

        // Check shared install directories if the primary path doesn't exist
        let path = if matches!(&self.request, ToolRequest::Path { .. }) {
            path
        } else {
            env::find_in_shared_installs(path, &self.ba().tool_dir_name(), &pathname)
        };

        // Only cache the resolved path if it actually exists on disk. Otherwise
        // the answer may change once the tool installs into a different
        // location (e.g. a shared install dir created mid-run by `--system` /
        // `--shared`), and the stale cache entry would be returned to callers
        // like core go's `exec_env`, sending wrong values for GOROOT/GOPATH.
        if path.exists() {
            INSTALL_PATH_CACHE.insert(self.clone(), path.clone());

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Ensure the tool path exists and is resolvable (no dangling symlinks) so it can be absolutized; check the configured path for typos.

When it happens

Trigger: Thrown at src/toolset/tool_version.rs:216 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/75b4c1ad31eebf25. Report an issue: GitHub.