Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions run-nobleo-hooks
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ def main():
os.environ['SKIP'] = ','.join(skips)

# Use prek if available
runner = f'{r} --no-progress' if (r := shutil.which('prek')) else 'pre-commit'
cfg = os.path.join(HERE, 'nobleo-hooks.yaml')
cmd = [runner, 'run', '--config', cfg, '--files'] + args.files
args = ['--config', cfg, '--files'] + args.files
if shutil.which('prek'):
cmd = ['prek', 'run', '--no-progress', '--hide-status', 'skipped'] + args
else:
cmd = ['pre-commit', 'run'] + args
os.execvp(cmd[0], cmd)


Expand Down
Loading