From 1ff95c33ca9490969bf7181889e62756484903a2 Mon Sep 17 00:00:00 2001 From: Prabhjyot Singh Sodhi Date: Mon, 9 Feb 2015 23:53:55 +0530 Subject: [PATCH] improving mach run error message in case of missing binaries --- python/servo/post_build_commands.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 7cec97f0d0a..d427fe1181f 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -75,7 +75,14 @@ class MachCommands(CommandBase): else: args = args + params - subprocess.check_call(args, env=env) + try: + subprocess.check_call(args, env=env) + except OSError as e: + if e.errno == 2: + print("Servo Binary can't be found! Run './mach build'" + " and try again!") + else: + raise e @Command('doc', description='Generate documentation',