Auto merge of #6738 - mbrubeck:bootstrap, r=larsbergstrom

Perform argument validation before bootstrapping.

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6738)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-07-25 09:32:30 -06:00
commit c7f73ebc29

View file

@ -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: