Skip to content

Disable progress for prek to prevent undesired shell manipulation - #10

Closed
whoutman wants to merge 2 commits into
feature/prekfrom
prek_no_progress
Closed

whoutman wants to merge 2 commits into
feature/prekfrom
prek_no_progress

Conversation

@whoutman

Copy link
Copy Markdown
Contributor

No description provided.

@whoutman
whoutman requested a review from Timple August 13, 2026 14:15
@whoutman whoutman closed this Aug 13, 2026
Comment thread run-nobleo-hooks
Comment on lines +21 to +26
option = ''
if runner := shutil.which('prek'):
option = '--no-progress' # prevents manipulated shell output for nested runs
else:
runner = 'pre-commit'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have stayed a one-liner I guess:

Suggested change
option = ''
if runner := shutil.which('prek'):
option = '--no-progress' # prevents manipulated shell output for nested runs
else:
runner = 'pre-commit'
runner = f"{r} --no-progress" if (r := shutil.which('prek')) else 'pre-commit'

But this works as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants