From ded08d5fe6e4e5181e1ed50b7d40233777909002 Mon Sep 17 00:00:00 2001 From: Suvish Varghese Thoovamalayil Date: Thu, 11 Feb 2016 16:09:00 +0530 Subject: [PATCH] Exit mach with an error when building on a path with spaces. Fixes #9442 --- python/mach_bootstrap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index a700b4c2419..2ec070826da 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -149,6 +149,13 @@ def _activate_virtualenv(topdir): def bootstrap(topdir): topdir = os.path.abspath(topdir) + # We don't support paths with spaces for now + # https://github.com/servo/servo/issues/9442 + if ' ' in topdir: + print('Cannot run mach in a path with spaces.') + print('Current path:', topdir) + sys.exit(1) + # Ensure we are running Python 2.7+. We put this check here so we generate a # user-friendly error message rather than a cryptic stack trace on module # import.