Honor NINJA_STATUS if already set (#2984)

* Honor NINJA_STATUS if already set

Allow build environments at downstream to use their own configured
NINJA_STATUS if set.

* Update CONTRIBUTORS
This commit is contained in:
Kai Knoblich 2024-02-01 05:56:14 +01:00 committed by GitHub
parent 42cc2c913c
commit 54b1cc5689
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -157,7 +157,7 @@ Marko Sisovic <msisovic13@gmail.com>
Viktor Ricci <ricci@primateer.de>
Harvey Randall <harveyrandall2001@gmail.com>
Pedro Lameiras <pedrolameiras@tecnico.ulisboa.pt>
Kai Knoblich <kai@FreeBSD.org>
Kai Knoblich <kai@FreeBSD.org>
********************

View file

@ -60,7 +60,6 @@ pub fn run_build(args: BuildArgs) {
.arg("-f")
.arg(&build_file)
.args(ninja_args)
.env("NINJA_STATUS", "[%f/%t; %r active; %es] ")
.env("PATH", &path)
.env(
"MYPY_CACHE_DIR",
@ -75,6 +74,10 @@ pub fn run_build(args: BuildArgs) {
// Updating svelte-check or its deps will likely remove the need for it.
.env("NODE_OPTIONS", "--no-experimental-fetch");
if env::var("NINJA_STATUS").is_err() {
command.env("NINJA_STATUS", "[%f/%t; %r active; %es] ");
}
// run build
let mut status = command.status().expect("ninja not installed");
if !status.success() && Instant::now().duration_since(start_time).as_secs() < 3 {