From 568ed3ae39b237af7eb232cfc77f1e5411d399ce Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Fri, 13 Oct 2023 20:55:42 +0200 Subject: [PATCH] pipeline: don't bomb when logging int value's length (GHA outputs) --- lib/tools/common/gha.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tools/common/gha.py b/lib/tools/common/gha.py index c7655bb39..ecdabc160 100644 --- a/lib/tools/common/gha.py +++ b/lib/tools/common/gha.py @@ -17,7 +17,8 @@ def set_gha_output(name, value): with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: print(f'{name}={value}', file=fh) - log.info(f"Set GHA output '{name}' to ({len(value)} bytes) '{value}'") + length = len(f"{value}") + log.info(f"Set GHA output '{name}' to ({length} bytes) '{value}'") def set_multiline_gha_output(name, value):