Skip to content

Commit c4b77fb

Browse files
jeanasJulienPalard
authored andcommitted
merge.py: Use git ls-files to get list of downstream PO files
The previous method could lead to problems if a dependency installed within venv/ shipped with its own PO files.
1 parent 2395178 commit c4b77fb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

merge.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ def main():
123123
for file in pot_path.glob("**/*.pot")
124124
}
125125
downstream = {
126-
po
127-
for po in Path(".").glob("**/*.po")
128-
if not (po.is_relative_to(Path("locales")) or po.is_relative_to(Path(".git")))
126+
Path(po)
127+
for po in run("git", "ls-files", "*.po", stdout=PIPE).stdout.splitlines()
129128
}
130129
copy_new_files(upstream - downstream, pot_path=pot_path)
131130
update_known_files(upstream & downstream, pot_path=pot_path)

0 commit comments

Comments
 (0)