Skip to content

Commit 68616f4

Browse files
committed
fix: don't show all of COVERAGE_PROCESS_CONFIG in --debugs=sys
1 parent 62434e7 commit 68616f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

coverage/debug.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ def relevant_environment_display(env: Mapping[str, str]) -> list[tuple[str, str]
613613
slugs = {"COV", "PY"}
614614
include = {"HOME", "TEMP", "TMP"}
615615
cloak = {"API", "TOKEN", "KEY", "SECRET", "PASS", "SIGNATURE"}
616+
truncate = {"COVERAGE_PROCESS_CONFIG"}
617+
truncate_len = 60
616618

617619
to_show = []
618620
for name, val in env.items():
@@ -624,5 +626,8 @@ def relevant_environment_display(env: Mapping[str, str]) -> list[tuple[str, str]
624626
if keep:
625627
if any(slug in name for slug in cloak):
626628
val = re.sub(r"\w", "*", val)
629+
if name in truncate:
630+
if len(val) > truncate_len:
631+
val = val[:truncate_len-3] + "..."
627632
to_show.append((name, val))
628633
return human_sorted_items(to_show)

0 commit comments

Comments
 (0)