servo: Merge #6738 - Perform argument validation before bootstrapping (from mbrubeck:bootstrap); r=larsbergstrom

If there's an error in the command-line arguments for `mach build`, we should print it before starting a (potentially) long bootstrap process, not after.

r? @larsbergstrom or @frewsxcv

Source-Repo: https://github.com/servo/servo
Source-Revision: c7f73ebc2938e5dc67a10238cac9fc10f95e2f5f
This commit is contained in:
Matt Brubeck 2015-07-25 09:32:30 -06:00
Родитель 1681a8d3df
Коммит d3b025f833
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -142,8 +142,6 @@ class MachCommands(CommandBase):
help="Command-line arguments to be passed through to Cargo")
def build(self, target=None, release=False, dev=False, jobs=None,
android=None, verbose=False, debug_mozjs=False, params=None):
self.ensure_bootstrapped()
if android is None:
android = self.config["build"]["android"]
@ -175,6 +173,8 @@ class MachCommands(CommandBase):
print("Please specify either --dev or --release.")
sys.exit(1)
self.ensure_bootstrapped()
if release:
opts += ["--release"]
if target: