mirror of
https://github.com/servo/servo.git
synced 2025-06-29 11:33:39 +01:00
Put correct version number in rustup version-requirement string, sys.exit(1) on bad rustup version
This commit is contained in:
parent
0d142bea9a
commit
f80958d2e8
1 changed files with 5 additions and 4 deletions
|
@ -1033,13 +1033,14 @@ install them, let us know by filing a bug!")
|
||||||
print("It looks like rustup is not installed. See instructions at "
|
print("It looks like rustup is not installed. See instructions at "
|
||||||
"https://github.com/servo/servo/#setting-up-your-environment")
|
"https://github.com/servo/servo/#setting-up-your-environment")
|
||||||
print()
|
print()
|
||||||
return 1
|
sys.exit(1)
|
||||||
raise
|
raise
|
||||||
version = tuple(map(int, re.match(b"rustup (\d+)\.(\d+)\.(\d+)", version_line).groups()))
|
version = tuple(map(int, re.match(b"rustup (\d+)\.(\d+)\.(\d+)", version_line).groups()))
|
||||||
if version < (1, 21, 0):
|
version_needed = (1, 21, 0)
|
||||||
print("rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version)
|
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'.")
|
print("Try running 'rustup self update'.")
|
||||||
return 1
|
sys.exit(1)
|
||||||
|
|
||||||
def ensure_clobbered(self, target_dir=None):
|
def ensure_clobbered(self, target_dir=None):
|
||||||
if target_dir is None:
|
if target_dir is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue