Bug 1658040 - Part 2: Deny `mach package-multi-locale ...` when it's going to fail. r=froydnj

Depends on D87331

Differential Revision: https://phabricator.services.mozilla.com/D87332
This commit is contained in:
Nick Alexander 2020-08-18 17:07:47 +00:00
Родитель a1aff5b241
Коммит 9c623dbc86
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -1426,6 +1426,14 @@ class L10NCommands(MachCommandBase):
@CommandArgument('--verbose', action='store_true',
help='Log informative status messages.')
def package_l10n(self, verbose=False, locales=[]):
if 'RecursiveMake' not in self.substs['BUILD_BACKENDS']:
print('Artifact builds do not support localization. '
'If you know what you are doing, you can use:\n'
'ac_add_options --disable-compile-environment\n'
'export BUILD_BACKENDS=FasterMake,RecursiveMake\n'
'in your mozconfig.')
return 1
if 'en-US' not in locales:
self.log(logging.WARN, 'package-multi-locale', {'locales': locales},
'List of locales does not include default locale "en-US": '