mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1585828 - Replace is_firefox_or_android condition with has_build condition on mach run/mach install r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D47992 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2322d61c8b
commit
68b84bf193
@ -957,6 +957,12 @@ class MachCommandConditions(object):
|
||||
"""Must have a Firefox or Android build."""
|
||||
return MachCommandConditions.is_firefox(cls) or MachCommandConditions.is_android(cls)
|
||||
|
||||
@staticmethod
|
||||
def has_build(cls):
|
||||
"""Must have a build."""
|
||||
return (MachCommandConditions.is_firefox_or_android(cls) or
|
||||
MachCommandConditions.is_thunderbird(cls))
|
||||
|
||||
@staticmethod
|
||||
def is_hg(cls):
|
||||
"""Must have a mercurial source checkout."""
|
||||
|
@ -677,7 +677,7 @@ class Install(MachCommandBase):
|
||||
"""Install a package."""
|
||||
|
||||
@Command('install', category='post-build',
|
||||
conditions=[conditions.is_firefox_or_android],
|
||||
conditions=[conditions.has_build],
|
||||
description='Install the package on the machine (or device in the case of Android).')
|
||||
@CommandArgument('--verbose', '-v', action='store_true',
|
||||
help='Print verbose output when installing.')
|
||||
@ -799,7 +799,7 @@ class RunProgram(MachCommandBase):
|
||||
"""Run the compiled program."""
|
||||
|
||||
@Command('run', category='post-build',
|
||||
conditions=[conditions.is_firefox_or_android],
|
||||
conditions=[conditions.has_build],
|
||||
parser=setup_run_parser,
|
||||
description='Run the compiled program, possibly under a debugger or DMD.')
|
||||
def run(self, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user