From a2ebf4dd2e6aff6cfcac8d18e4924b6e05621fb3 Mon Sep 17 00:00:00 2001 From: Tim Clephas Date: Mon, 21 Sep 2026 09:09:28 +0200 Subject: [PATCH] Hotfix: os.execvp can only take single command and arguments --- run-nobleo-hooks | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/run-nobleo-hooks b/run-nobleo-hooks index a719556..5ca6c0f 100755 --- a/run-nobleo-hooks +++ b/run-nobleo-hooks @@ -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)