{"record":{"id":"b357a81916617694","repo":"jdx/mise","slug":"must-set-url","errorCode":null,"errorMessage":"must set `url`","messagePattern":"must set `url`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/repos.rs","lineNumber":124,"sourceCode":"                .any(|component| matches!(component, Component::Normal(_)))\n            {\n                bail!(\n                    \"relative repo path `{path_raw}` must name a directory inside the project root\"\n                );\n            }\n            // Join only the Normal segments so `./foobar` resolves to\n            // `<root>/foobar` rather than `<root>/./foobar` — a `.` component\n            // survives `Path::join` and leaks into every displayed path.\n            let mut resolved = root.to_path_buf();\n            for component in path.components() {\n                if let Component::Normal(segment) = component {\n                    resolved.push(segment);\n                }\n            }\n            resolved\n        };\n        let Some(url) = config.url.map(|s| s.trim().to_string()) else {\n            bail!(\"must set `url`\");\n        };\n        if url.is_empty() {\n            bail!(\"must set a non-empty `url`\");\n        }\n        if url.starts_with('-') {\n            bail!(\"`url` must not start with `-`\");\n        }\n        let git_ref = config.git_ref.map(|s| s.trim().to_string());\n        let git_ref = match git_ref {\n            Some(git_ref) if git_ref.is_empty() => bail!(\"`ref` must not be empty\"),\n            Some(git_ref) if git_ref.starts_with('-') => bail!(\"`ref` must not start with `-`\"),\n            other => other,\n        };\n        Ok(Self {\n            path_raw,\n            path,\n            url,\n            git_ref,","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/repos.rs#L106-L142","documentation":"Every `[bootstrap.repos]` entry must carry a `url` — the git remote mise clones from and compares the existing origin against. from_toml bails with `must set url` when the url key is entirely absent from the entry's table (a distinct case from an empty or dash-prefixed url).","triggerScenarios":"`[bootstrap.repos.\"~/src/x\"]` with only `ref = \"main\"`, or `\"~/src/x\" = { }` — no url key at all.","commonSituations":"Expecting mise to update an existing clone without configuring its remote; config generators or templating that drop the url field; entries added as documentation.","solutions":["Add `url = \"https://github.com/owner/repo.git\"` (or an ssh form) to the entry","Remove the entry if you manage that clone by hand"],"exampleFix":"# before\n[bootstrap.repos]\n\"~/src/x\" = { ref = \"main\" }\n\n# after\n[bootstrap.repos]\n\"~/src/x\" = { url = \"https://github.com/owner/repo.git\", ref = \"main\" }","handlingStrategy":"validation","validationCode":"fn repo_entry_is_complete(cfg: &RepoTomlConfig) -> bool {\n    cfg.url.as_deref().is_some()\n}","typeGuard":"fn repo_entry_has_url(cfg: &RepoTomlConfig) -> bool {\n    cfg.url.as_deref().is_some()\n}","tryCatchPattern":null,"preventionTips":["Every `[bootstrap.repos]` entry needs `url`; `ref` is the only optional field","Validate mise.toml with `mise config` / a dry-run bootstrap before committing"],"tags":["mise","bootstrap","repos","config","required-field"],"backgroundTag":"missing-required-config-field","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}