Bug 1776344 - Properly strip newlines when reading path files. r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D150257
This commit is contained in:
Ryan VanderMeulen 2022-06-24 18:34:58 +00:00
Родитель 617487c8c7
Коммит b667d62420
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1501,8 +1501,10 @@ class BuildDriver(MozbuildObject):
pathToThirdparty, encoding="utf-8", newline="\n"
) as f, io.open(pathToGenerated, encoding="utf-8", newline="\n") as g:
# Normalize the path (no trailing /)
suppress = f.readlines() + g.readlines()
LOCAL_SUPPRESS_DIRS = tuple(s.strip("/") for s in suppress)
LOCAL_SUPPRESS_DIRS = tuple(
[line.strip("\n/") for line in f]
+ [line.strip("\n/") for line in g]
)
else:
# For application based on gecko like thunderbird
LOCAL_SUPPRESS_DIRS = ()