mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
domain-substitution: exclude LICENSE files from substitution
This commit is contained in:
@@ -114,6 +114,8 @@ DOMAIN_EXCLUDE_PREFIXES = [
|
||||
'third_party/blink/renderer/core/dom/document.cc',
|
||||
# Exclusion to allow download of sysroots
|
||||
'build/linux/sysroot_scripts/sysroots.json',
|
||||
# Licenses and credits
|
||||
'tools/licenses/licenses.py',
|
||||
]
|
||||
|
||||
# pylint: enable=line-too-long
|
||||
@@ -244,6 +246,10 @@ def should_domain_substitute(path, relative_path, search_regex, used_dep_set, us
|
||||
if relative_path_posix.startswith(exclude_prefix):
|
||||
used_dep_set.add(exclude_prefix)
|
||||
return False
|
||||
# Skip LICENSE.* files so that they remain untouched.
|
||||
for license_path in ['license', 'license.txt', 'license.html']:
|
||||
if relative_path_posix.endswith('/' + license_path):
|
||||
return False
|
||||
return _check_regex_match(path, search_regex)
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user