From bb39f3555c14275472386ffca637071e22714521 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 29 Jul 2020 13:55:34 -0700 Subject: Provide a better diagnostic if ninja isn't installed Let people know that they can set ninja=false if they don't want to install ninja. --- src/bootstrap/sanity.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index f89bef50de9..533b5c79777 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -100,8 +100,16 @@ pub fn check(build: &mut Build) { if build.config.ninja { // Some Linux distros rename `ninja` to `ninja-build`. // CMake can work with either binary name. - if cmd_finder.maybe_have("ninja-build").is_none() { - cmd_finder.must_have("ninja"); + if cmd_finder.maybe_have("ninja-build").is_none() + && cmd_finder.maybe_have("ninja").is_none() + { + eprintln!( + " +Couldn't find required command: ninja +You should install ninja, or set ninja=false in config.toml +" + ); + std::process::exit(1); } } -- cgit 1.4.1-3-g733a5