From 2ad37bda2c58cd8b79c645316bd1e4580a881a37 Mon Sep 17 00:00:00 2001 From: wayling Date: Sat, 28 Jul 2018 21:59:06 +0800 Subject: "./mach env" cause unclear message Use the "get" instead to avoid the error. --- python/servo/bootstrap_commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index b422a553003..ce4e12381e0 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -38,12 +38,12 @@ class MachCommands(CommandBase): category='bootstrap') def env(self): env = self.build_env() - print("export RUSTFLAGS=%s" % env["RUSTFLAGS"]) - print("export PATH=%s" % env["PATH"]) + print("export RUSTFLAGS=%s" % env.get("RUSTFLAGS", "")) + print("export PATH=%s" % env.get("PATH", "")) if sys.platform == "darwin": - print("export DYLD_LIBRARY_PATH=%s" % env["DYLD_LIBRARY_PATH"]) + print("export DYLD_LIBRARY_PATH=%s" % env.get("DYLD_LIBRARY_PATH", "")) else: - print("export LD_LIBRARY_PATH=%s" % env["LD_LIBRARY_PATH"]) + print("export LD_LIBRARY_PATH=%s" % env.get("LD_LIBRARY_PATH", "")) @Command('bootstrap', description='Install required packages for building.', -- cgit v1.2.3