{"record":{"id":"618d00c3c4321f1f","repo":"jdx/mise","slug":"must-set-a-non-empty-url","errorCode":null,"errorMessage":"must set a non-empty `url`","messagePattern":"must set a non-empty `url`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/repos.rs","lineNumber":127,"sourceCode":"                    \"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,\n        })\n    }\n}","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/repos.rs#L109-L145","documentation":"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.","triggerScenarios":"`url = \"\"` or `url = \"   \"` under an `[bootstrap.repos]` entry.","commonSituations":"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.","solutions":["Set a real remote URL","If the value is interpolated, verify the variable is set in the environment before running bootstrap"],"exampleFix":"# before\nurl = \"\"\n\n# after\nurl = \"https://github.com/owner/repo.git\"","handlingStrategy":"validation","validationCode":"fn repo_url_is_usable(cfg: &RepoTomlConfig) -> bool {\n    cfg.url.as_deref().is_some_and(|u| !u.trim().is_empty())\n}","typeGuard":"fn repo_url_is_nonempty(cfg: &RepoTomlConfig) -> bool {\n    cfg.url.as_deref().is_some_and(|u| !u.trim().is_empty())\n}","tryCatchPattern":null,"preventionTips":["Check interpolated variables resolve to a non-empty value before running bootstrap","Omit the url key rather than leaving it blank when a generator has no value"],"tags":["mise","bootstrap","repos","config","validation"],"backgroundTag":"empty-config-value","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}