From b536b3e12d2d10a5f4e09cb2e2a6fb194d774650 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Thu, 19 Dec 2024 19:06:44 -0600 Subject: [PATCH] SCons: Don't update node count when empty --- methods.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/methods.py b/methods.py index 8f8095bbbb63..4351584c6b64 100644 --- a/methods.py +++ b/methods.py @@ -872,12 +872,12 @@ def __init__(self): self.max = int(f.readline()) except OSError: pass - if self.max == 0: - print("NOTE: Performing initial build, progress percentage unavailable!") # Progress reporting is not available in non-TTY environments since it # messes with the output (for example, when writing to a file). self.display = cast(bool, self.max and env["progress"] and IS_TTY) + if self.display and not self.max: + print_info("Performing initial build, progress percentage unavailable!") def __call__(self, node, *args, **kw): self.count += 1 @@ -893,7 +893,7 @@ def __call__(self, node, *args, **kw): Progress(progressor) def progress_finish(): - if len(GetBuildFailures()): + if GetBuildFailures() or not progressor.count: return try: with open(NODE_COUNT_FILENAME, "w", encoding="utf-8", newline="\n") as f: