Compare commits

...

2 Commits

Author SHA1 Message Date
0954c2322a Merge branch 'truncation'
Some checks failed
Python package / lint (push) Successful in -17s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in -16s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Failing after -21s
Fixes #1
2024-12-08 13:26:59 -07:00
8c1e9751af Fix truncation warning 2024-12-08 13:26:25 -07:00

View File

@ -98,13 +98,12 @@ def wrap(command: List[str], config: Path, retries: int, version: bool, dry_run:
MAX_LINES = 20
lines = stdout.splitlines()
truncated = False
if len(lines) > MAX_LINES:
truncated = True
lines = lines[-MAX_LINES:]
message = (
"Command:\n"
+ " ".join(command)
+ f'\n\nResult{ " (truncated)" if len(lines) > MAX_LINES else ""}:\n'
+ "\n".join(lines)
"Command:\n" + " ".join(command) + f'\n\nResult{ " (truncated)" if truncated else ""}:\n' + "\n".join(lines)
)
if not dry_run: