You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Long tasks name make invoke --list | grep a crash with "invalid width" #1071
from invoke.tasks import task
@task
def my_very_long_task_name_that_is_completely_legit_but_make_grep_crash_aaaaaa(c):
print('Here')
Run wihtout grep:
$ uv run invoke --list
Available tasks:
my-very-long-task-name-that-is-completely-legit-but-make-grep-crash-aaaaaa
Run with grep:
$ uv run invoke --list | grep a
Traceback (most recent call last):
File "/my/project/.venv/bin/invoke", line 10, in <module>
Available tasks:
sys.exit(program.run())
^^^^^^^^^^^^^
File "/my/project/.venv/lib/python3.12/site-packages/invoke/program.py", line 391, in run
self.parse_cleanup()
File "/my/project/.venv/lib/python3.12/site-packages/invoke/program.py", line 530, in parse_cleanup
self.list_tasks()
File "/my/project/.venv/lib/python3.12/site-packages/invoke/program.py", line 815, in list_tasks
getattr(self, "list_{}".format(self.list_format))()
File "/my/project/.venv/lib/python3.12/site-packages/invoke/program.py", line 819, in list_flat
self.display_with_columns(pairs=pairs)
File "/my/project/.venv/lib/python3.12/site-packages/invoke/program.py", line 932, in display_with_columns
self.print_columns(pairs)
File "/my/project/.venv/lib/python3.12/site-packages/invoke/program.py", line 969, in print_columns
help_chunks = wrapper.wrap(help_str)
^^^^^^^^^^^^^^^^^^^^^^
File "/my/project/.share/uv/python/cpython-3.12.11-macos-aarch64-none/lib/python3.12/textwrap.py", line 360, in wrap
return self._wrap_chunks(chunks)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/my/project/.local/share/uv/python/cpython-3.12.11-macos-aarch64-none/lib/python3.12/textwrap.py", line 254, in _wrap_chunks
raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width 0 (must be > 0)
changed the title [-]Long tasks name makes `invoke --list | grep a` crash with "invalid width"[/-][+]Long tasks name make `invoke --list | grep a` crash with "invalid width"[/+]on May 27, 2026
Activity
[-]Long tasks name makes `invoke --list | grep a` crash with "invalid width"[/-][+]Long tasks name make `invoke --list | grep a` crash with "invalid width"[/+]