servo: Merge #9601 - Exit mach with an error when building on a path with spaces. Fixes #9442 (from vishy1618:issue_9442); r=Wafflespeanut

Source-Repo: https://github.com/servo/servo
Source-Revision: 76381418bd04d94afac79a1fa5d4366d71c1a3de
This commit is contained in:
Suvish Varghese Thoovamalayil
2016-02-12 18:50:35 +05:00
parent c85a6afb33
commit cd36444869

View File

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