1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

libflake: Fix flake id flake refs with revisions

Starting from c436b7a32a
this used to lead to assertion failures like:

> std::string nix::ParsedURL::renderAuthorityAndPath() const: Assertion `path.empty() || path.front().empty()' failed.

This has the bugfix for the issue and regressions tests
so that this gets properly tested in the future.
This commit is contained in:
Sergei Zimmerman 2025-08-30 01:26:51 +03:00
parent 0d006aedd6
commit 3ef3f525c3
No known key found for this signature in database
2 changed files with 86 additions and 1 deletions

View file

@ -198,7 +198,7 @@ parseFlakeIdRef(const fetchers::Settings & fetchSettings, const std::string & ur
if (std::regex_match(url, match, flakeRegex)) {
auto parsedURL = ParsedURL{
.scheme = "flake",
.authority = ParsedURL::Authority{},
.authority = std::nullopt,
.path = splitString<std::vector<std::string>>(match[1].str(), "/"),
};