mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Print a link to instructions if rustup is not found.
This commit is contained in:
parent
f2c398fd5c
commit
2f941d8450
1 changed files with 11 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
# option. This file may not be copied, modified, or distributed
|
# option. This file may not be copied, modified, or distributed
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
|
from errno import ENOENT as NO_SUCH_FILE_OR_DIRECTORY
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import gzip
|
import gzip
|
||||||
import itertools
|
import itertools
|
||||||
|
@ -322,9 +323,18 @@ class CommandBase(object):
|
||||||
def call_rustup_run(self, args, **kwargs):
|
def call_rustup_run(self, args, **kwargs):
|
||||||
if self.config["tools"]["use-rustup"]:
|
if self.config["tools"]["use-rustup"]:
|
||||||
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.toolchain()] + args
|
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.toolchain()] + args
|
||||||
|
try:
|
||||||
|
return call(args, **kwargs)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno == NO_SUCH_FILE_OR_DIRECTORY:
|
||||||
|
print "It looks like rustup is not installed. See instructions at " \
|
||||||
|
"https://github.com/servo/servo/#setting-up-your-environment"
|
||||||
|
print
|
||||||
|
return 1
|
||||||
|
raise
|
||||||
else:
|
else:
|
||||||
args[0] += BIN_SUFFIX
|
args[0] += BIN_SUFFIX
|
||||||
return call(args, **kwargs)
|
return call(args, **kwargs)
|
||||||
|
|
||||||
def get_top_dir(self):
|
def get_top_dir(self):
|
||||||
return self.context.topdir
|
return self.context.topdir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue