aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-09-29 23:33:16 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-09-29 23:33:16 +0200
commit64e9b3c83b7cf7f3c7348426666ccca2ca395d28 (patch)
treeaef47184cd3a12a434c0a6fe59f89a2297020d70 /src/libexpr/flake
parente2d398c200023a0d1e0054c536e7f6438bd2b139 (diff)
nix registry list: Show 'dir' attribute
Issue #4050.
Diffstat (limited to 'src/libexpr/flake')
-rw-r--r--src/libexpr/flake/flakeref.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc
index d5c2ffe66..87b202643 100644
--- a/src/libexpr/flake/flakeref.cc
+++ b/src/libexpr/flake/flakeref.cc
@@ -16,10 +16,10 @@ const static std::string subDirRegex = subDirElemRegex + "(?:/" + subDirElemRege
std::string FlakeRef::to_string() const
{
- auto url = input.toURL();
+ std::map<std::string, std::string> extraQuery;
if (subdir != "")
- url.query.insert_or_assign("dir", subdir);
- return url.to_string();
+ extraQuery.insert_or_assign("dir", subdir);
+ return input.toURLString(extraQuery);
}
fetchers::Attrs FlakeRef::toAttrs() const