mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Don't partial match sourcehut refs
This commit is contained in:
parent
345a8ee0cb
commit
9720797f69
1 changed files with 3 additions and 1 deletions
|
@ -399,7 +399,9 @@ struct SourceHutInputScheme : GitArchiveInputScheme
|
|||
std::string line;
|
||||
std::string id;
|
||||
while(getline(is, line)) {
|
||||
std::regex pattern(ref_uri);
|
||||
// Append $ to avoid partial name matches
|
||||
std::regex pattern(fmt("%s$", ref_uri));
|
||||
|
||||
if (std::regex_search(line, pattern)) {
|
||||
id = line.substr(0, line.find('\t'));
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue