From cdf638f52ea80f0d979f4ecc0416a09e52ead8c6 Mon Sep 17 00:00:00 2001 From: meowtec Date: Thu, 23 Nov 2023 13:08:12 +0800 Subject: [PATCH] Improve hint for cmake not installed in Linux (code 127) --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 035cead..c088452 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1074,6 +1074,12 @@ fn run(cmd: &mut Command, program: &str) { Err(e) => fail(&format!("failed to execute command: {}", e)), }; if !status.success() { + if status.code() == Some(127) { + fail(&format!( + "command did not execute successfully, got: {}, is `{}` not installed?", + status, program + )); + } fail(&format!( "command did not execute successfully, got: {}", status