diff options
author | pshaughn <pshaughn@comcast.net> | 2020-01-05 13:32:48 -0500 |
---|---|---|
committer | Patrick Shaughnessy <pshaughn@comcast.net> | 2020-01-06 11:23:56 -0500 |
commit | f80958d2e87d298f267f0afc8c73d8090973e4c8 (patch) | |
tree | 78d67247982f1598863742edadcdf1b3a7098fe0 /python/servo/command_base.py | |
parent | 0d142bea9ae9b822c0d03d23b00dae23126a92c8 (diff) | |
download | servo-f80958d2e87d298f267f0afc8c73d8090973e4c8.tar.gz servo-f80958d2e87d298f267f0afc8c73d8090973e4c8.zip |
Put correct version number in rustup version-requirement string, sys.exit(1) on bad rustup version
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index ee6ee0e450d..31eb17800ae 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -1033,13 +1033,14 @@ install them, let us know by filing a bug!") print("It looks like rustup is not installed. See instructions at " "https://github.com/servo/servo/#setting-up-your-environment") print() - return 1 + sys.exit(1) raise version = tuple(map(int, re.match(b"rustup (\d+)\.(\d+)\.(\d+)", version_line).groups())) - if version < (1, 21, 0): - print("rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version) + version_needed = (1, 21, 0) + if version < version_needed: + print("rustup is at version %s.%s.%s, Servo requires %s.%s.%s or more recent." % (version + version_needed)) print("Try running 'rustup self update'.") - return 1 + sys.exit(1) def ensure_clobbered(self, target_dir=None): if target_dir is None: |