Bug 1513216 - Don't collect build telemetry when 'mach' is ran from hg format-source. r=sheehan

Differential Revision: https://phabricator.services.mozilla.com/D14146

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andi-Bogdan Postelnicu 2018-12-13 18:09:03 +00:00
Родитель 9e282c21e8
Коммит 8286177e5a
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -229,6 +229,10 @@ def bootstrap(topsrcdir, mozilla_dir=None):
if depth != 1 or os.environ.get('MACH_MAIN_PID') != str(os.getpid()):
return
# Don't write telemetry data for 'mach' when 'DISABLE_TELEMETRY' is set.
if os.environ.get('DISABLE_TELEMETRY') == '1':
return
# We have not opted-in to telemetry
if not context.settings.build.telemetry:
return