Skip to content

Exclude 'dir' from the FlakeRef's URL #12801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: 2.24-maintenance
Choose a base branch
from

Conversation

pascalj
Copy link

@pascalj pascalj commented Mar 29, 2025

Motivation

This fixes an issue where nix would try to check out invalid URLs, because it would pass 'dir' to the HTTP endpoint.

For later versions this was fixed in b2be6fe. This is a backport of just the relevant part.

Context

See #12417, where this is first discussed.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

This fixes an issue where nix would try to check out invalid URLs,
because it would pass 'dir' to the HTTP endpoint.

For later versions this was fixed in
b2be6fe. This is a backport of just the
relevant part.

See NixOS#12417
@Mic92 Mic92 force-pushed the 2.24-maintenance branch from 61069a5 to 72bf563 Compare April 15, 2025 11:34
@@ -234,15 +234,16 @@ std::optional<std::pair<FlakeRef, std::string>> parseURLFlakeRef(
return std::nullopt;
}

const auto subdir = getOr(parsedURL.query, "dir", "");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is missing here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants