Skip to content

Commit

Permalink
nix develop: Fix bad regex
Browse files Browse the repository at this point in the history
This was accepted by libstdc++ but not libc++.

https://hydra.nixos.org/build/123569154
  • Loading branch information
edolstra committed Jul 3, 2020
1 parent 6f8fd3a commit c3c7aed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nix/develop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ BuildEnvironment readEnvironment(const Path & path)
R"re((?:\$?'(?:[^'\\]|\\[abeEfnrtv\\'"?])*'))re";

static std::string indexedArrayRegex =
R"re((?:\(( *\[[0-9]+]="(?:[^"\\]|\\.)*")**\)))re";
R"re((?:\(( *\[[0-9]+\]="(?:[^"\\]|\\.)*")*\)))re";

static std::regex varRegex(
"^(" + varNameRegex + ")=(" + simpleStringRegex + "|" + quotedStringRegex + "|" + indexedArrayRegex + ")\n");
Expand Down

1 comment on commit c3c7aed

@nixos-discourse
Copy link

Choose a reason for hiding this comment

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

This commit has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-regex-match/7946/11

Please sign in to comment.