mirror of
https://github.com/servo/servo
synced 2026-05-12 09:56:50 +02:00
Fix "rustup is not installed" message
This commit is contained in:
@@ -323,15 +323,8 @@ class CommandBase(object):
|
||||
|
||||
def call_rustup_run(self, args, **kwargs):
|
||||
if self.config["tools"]["use-rustup"]:
|
||||
version_line = subprocess.check_output(["rustup" + BIN_SUFFIX, "--version"])
|
||||
version = tuple(map(int, re.match("rustup (\d+)\.(\d+)\.(\d+)", version_line).groups()))
|
||||
if version < (1, 8, 0):
|
||||
print "rustup is at version %s.%s.%s, Servo requires 1.8.0 or more recent." % version
|
||||
print "Try running 'rustup self update'."
|
||||
return 1
|
||||
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.toolchain()] + args
|
||||
try:
|
||||
return call(args, **kwargs)
|
||||
version_line = subprocess.check_output(["rustup" + BIN_SUFFIX, "--version"])
|
||||
except OSError as e:
|
||||
if e.errno == NO_SUCH_FILE_OR_DIRECTORY:
|
||||
print "It looks like rustup is not installed. See instructions at " \
|
||||
@@ -339,9 +332,15 @@ class CommandBase(object):
|
||||
print
|
||||
return 1
|
||||
raise
|
||||
version = tuple(map(int, re.match("rustup (\d+)\.(\d+)\.(\d+)", version_line).groups()))
|
||||
if version < (1, 8, 0):
|
||||
print "rustup is at version %s.%s.%s, Servo requires 1.8.0 or more recent." % version
|
||||
print "Try running 'rustup self update'."
|
||||
return 1
|
||||
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.toolchain()] + args
|
||||
else:
|
||||
args[0] += BIN_SUFFIX
|
||||
return call(args, **kwargs)
|
||||
return call(args, **kwargs)
|
||||
|
||||
def get_top_dir(self):
|
||||
return self.context.topdir
|
||||
|
||||
Reference in New Issue
Block a user