From d9d9554eb83c991b9d6ae44c12491bd14f7b1ce8 Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Fri, 5 Sep 2025 10:45:36 -0700 Subject: [PATCH] cat the entire config.log Signed-off-by: Daniel Paoliello --- jemalloc-sys/build.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 9ec19241d..07b60b7fe 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -385,7 +385,14 @@ fn make_command(make_cmd: &str, build_dir: &Path, num_jobs: &str) -> Command { fn run_and_log(cmd: &mut Command, log_file: &Path) { execute(cmd, || { - run(Command::new("tail").arg("-n").arg("100").arg(log_file)); + // In CI systems print the whole log since it can be difficult to get to + // a log file after the build fails. Otherwise print the last 100 lines + // to keep the output concise. + if env::var_os("CI").is_some() { + run(Command::new("cat").arg(log_file)); + } else { + run(Command::new("tail").arg("-n").arg("100").arg(log_file)); + } }) }