Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e150921

Browse files
committed
Followup to #533, match no files when omitted
1 parent fc907b5 commit e150921

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pre_commit/commands/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_filenames(args, include_expr, exclude_expr):
5757

5858

5959
def _run_single_hook(hook, repo, args, skips, cols):
60-
filenames = get_filenames(args, hook.get('files', ''), hook['exclude'])
60+
filenames = get_filenames(args, hook.get('files', '^$'), hook['exclude'])
6161
if hook['id'] in skips:
6262
output.write(get_hook_message(
6363
_hook_msg_start(hook, args.verbose),

0 commit comments

Comments
 (0)