jdx/mise · error

must set a non-empty `url`

Error message

must set a non-empty `url`

What it means

The url value is trimmed and then checked; a url consisting only of whitespace (or the empty string) is rejected as a distinct case from a missing url key, because `git clone ""` would only produce a confusing git error downstream.

Source

Thrown at src/system/repos.rs:127

                    "relative repo path `{path_raw}` must name a directory inside the project root"
                );
            }
            // Join only the Normal segments so `./foobar` resolves to
            // `<root>/foobar` rather than `<root>/./foobar` — a `.` component
            // survives `Path::join` and leaks into every displayed path.
            let mut resolved = root.to_path_buf();
            for component in path.components() {
                if let Component::Normal(segment) = component {
                    resolved.push(segment);
                }
            }
            resolved
        };
        let Some(url) = config.url.map(|s| s.trim().to_string()) else {
            bail!("must set `url`");
        };
        if url.is_empty() {
            bail!("must set a non-empty `url`");
        }
        if url.starts_with('-') {
            bail!("`url` must not start with `-`");
        }
        let git_ref = config.git_ref.map(|s| s.trim().to_string());
        let git_ref = match git_ref {
            Some(git_ref) if git_ref.is_empty() => bail!("`ref` must not be empty"),
            Some(git_ref) if git_ref.starts_with('-') => bail!("`ref` must not start with `-`"),
            other => other,
        };
        Ok(Self {
            path_raw,
            path,
            url,
            git_ref,
        })
    }
}

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Set a real remote URL
  2. If the value is interpolated, verify the variable is set in the environment before running bootstrap

Example fix

# before
url = ""

# after
url = "https://github.com/owner/repo.git"
Defensive patterns

Strategy: validation

Validate before calling

fn repo_url_is_usable(cfg: &RepoTomlConfig) -> bool {
    cfg.url.as_deref().is_some_and(|u| !u.trim().is_empty())
}

Type guard

fn repo_url_is_nonempty(cfg: &RepoTomlConfig) -> bool {
    cfg.url.as_deref().is_some_and(|u| !u.trim().is_empty())
}

Prevention

When it happens

Trigger: `url = ""` or `url = " "` under an `[bootstrap.repos]` entry.

Common situations: Env-var interpolation producing an empty string (`url = "${REPO_URL}"` with the variable unset); copy-paste leaving a blank value; config generators emitting empty strings instead of omitting the key.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/618d00c3c4321f1f. Report an issue: GitHub.