Skip to content

fix(tests): use glob instead of regex in nix-shell test#15254

Open
roberth wants to merge 1 commit intoNixOS:masterfrom
roberth:fix-test-nix-shell-in-pwd-with-plus
Open

fix(tests): use glob instead of regex in nix-shell test#15254
roberth wants to merge 1 commit intoNixOS:masterfrom
roberth:fix-test-nix-shell-in-pwd-with-plus

Conversation

@roberth
Copy link
Member

@roberth roberth commented Feb 16, 2026

The NIX_BUILD_TOP test used regex matching with an unquoted path variable. When the path contains + (or other regex operators), the test fails because + is interpreted as a quantifier rather than a literal character. Glob matching handles these characters correctly.

Motivation

I use worktree directories with a + in them.

Context


Add 👍 to pull requests you find important.

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

The NIX_BUILD_TOP test used regex matching with an unquoted path
variable. When the path contains `+` (or other regex operators),
the test fails because `+` is interpreted as a quantifier rather than
a literal character. Glob matching handles these characters correctly.
@roberth roberth requested a review from edolstra as a code owner February 16, 2026 20:08
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments