Bug 1477276 - Fix regression preventing |mach help| without an objdir r=bhearsum

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Halberstadt 2018-07-20 14:58:06 +00:00
parent 4859064649
commit 44f4128a40

View File

@ -20,7 +20,11 @@ from mach.decorators import (
SettingsProvider,
)
from mozbuild.base import MachCommandBase, MachCommandConditions as conditions
from mozbuild.base import (
BuildEnvironmentNotFoundException,
MachCommandBase,
MachCommandConditions as conditions,
)
from moztest.resolve import TEST_SUITES
from argparse import ArgumentParser
@ -336,7 +340,11 @@ class CheckSpiderMonkeyCommand(MachCommandBase):
def has_js_binary(binary):
def has_binary(cls):
name = binary + cls.substs['BIN_SUFFIX']
try:
name = binary + cls.substs['BIN_SUFFIX']
except BuildEnvironmentNotFoundException:
return False
path = os.path.join(cls.topobjdir, 'dist', 'bin', name)
has_binary.__doc__ = """