Skip to content

Commit 9d45626

Browse files
committed
In Nix < 2.20 compat mode, keep the 'dir' attr in URLs
1 parent 4f9c962 commit 9d45626

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libflake/flakeref.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static std::pair<FlakeRef, std::string>
6161
fromParsedURL(const fetchers::Settings & fetchSettings, ParsedURL && parsedURL, bool isFlake)
6262
{
6363
auto dir = getOr(parsedURL.query, "dir", "");
64-
parsedURL.query.erase("dir");
64+
if (!fetchSettings.nix219Compat)
65+
parsedURL.query.erase("dir");
6566

6667
std::string fragment;
6768
std::swap(fragment, parsedURL.fragment);

0 commit comments

Comments
 (0)