Skip to content

Commit c680bec

Browse files
authored
Merge pull request #433 from marcin-serwin/push-pvxulwypqxzu
Match last "got" in stderr to avoid false positives
2 parents 716174e + dd41903 commit c680bec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nix_update/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def nix_prefetch(opts: Options, attr: str) -> str:
135135
# expected 'xxx' but got 'xxx'
136136
regex = re.compile(r".*got(:|\s)\s*'?([^']*)('|$)")
137137
got = ""
138-
for line in stderr.split("\n"):
138+
for line in reversed(stderr.split("\n")):
139139
if match := regex.fullmatch(line):
140140
got = match[2]
141141
break

0 commit comments

Comments
 (0)