diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-05 14:36:25 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-05 14:36:25 +0000 |
commit | 03f4fafc27bd9f8def1df6a229a17fc2c3f0e0a0 (patch) | |
tree | ac78cb209f336e5c3cd1d145e2ed1444ba2e31c2 /src/nix/develop.cc | |
parent | df707d05d1671677efe5935356959722c4cc3a02 (diff) | |
parent | 088dcea0e80bf2861fd9d6b808e76a1669b7122a (diff) |
Merge remote-tracking branch 'upstream/master' into misc-ca
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r-- | src/nix/develop.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc index 43b86c64c..12658078a 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -68,22 +68,22 @@ BuildEnvironment readEnvironment(const Path & path) std::smatch match; - if (std::regex_search(pos, file.cend(), match, declareRegex)) { + if (std::regex_search(pos, file.cend(), match, declareRegex, std::regex_constants::match_continuous)) { pos = match[0].second; exported.insert(match[1]); } - else if (std::regex_search(pos, file.cend(), match, varRegex)) { + else if (std::regex_search(pos, file.cend(), match, varRegex, std::regex_constants::match_continuous)) { pos = match[0].second; res.env.insert({match[1], Var { .exported = exported.count(match[1]) > 0, .value = match[2] }}); } - else if (std::regex_search(pos, file.cend(), match, assocArrayRegex)) { + else if (std::regex_search(pos, file.cend(), match, assocArrayRegex, std::regex_constants::match_continuous)) { pos = match[0].second; res.env.insert({match[1], Var { .associative = true, .value = match[2] }}); } - else if (std::regex_search(pos, file.cend(), match, functionRegex)) { + else if (std::regex_search(pos, file.cend(), match, functionRegex, std::regex_constants::match_continuous)) { res.bashFunctions = std::string(pos, file.cend()); break; } |