{"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/533346cc374382b41ec5ff70536252b2e96e725c/src/system/repos.rs#L109-L145","documentation":"The `url` value is trimmed of surrounding whitespace and must not be empty. An empty (or whitespace-only) url would produce a broken `git clone`/`git fetch` invocation, so from_toml rejects it explicitly. This is distinct from the url-missing case: the key exists but holds no value.","triggerScenarios":"Writing `url = \"\"` or `url = \"   \"` in a `[bootstrap.repos]` entry.","commonSituations":"Templated or env-interpolated config where the url variable expanded to empty; clearing a url by hand without removing the entry; a TOML placeholder left unfilled.","solutions":["Set the url to the actual git remote, e.g. `url = \"https://github.com/jdx/dotfiles.git\"`","If the value comes from a template/variable, ensure it resolves non-empty at render time","Delete the entry until a valid url is known"],"exampleFix":"// before\n\"~/src/dotfiles\" = { url = \"\" }\n// after\n\"~/src/dotfiles\" = { url = \"https://github.com/jdx/dotfiles.git\" }","handlingStrategy":"validation","validationCode":"function validateUrl(entry) {\n  const url = (entry.url ?? '').trim();\n  if (url.length === 0) throw new Error('url must be a non-empty git remote');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never leave url empty/whitespace; delete the entry instead if unknown","When templating urls, validate the rendered value before writing mise.toml","Lint config for empty-string values in CI"],"tags":["config","empty-value","git","bootstrap"],"backgroundTag":"empty-required-field","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}