From 1918aa1b8010c00443b71f8bb976d4db4acf3c18 Mon Sep 17 00:00:00 2001 From: Lu Fang <30275821+houseroad@users.noreply.github.com> Date: Fri, 7 Feb 2025 05:04:39 -0800 Subject: [PATCH] [MISC][EASY] Break check file names into entry and args in the pre-commit hooks (#12880) Signed-off-by: Lu Fang --- .pre-commit-config.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b1c4fdf..3fb74ab9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -110,7 +110,10 @@ repos: pass_filenames: false - id: check-filenames name: Check for spaces in all filenames - entry: bash -c 'git ls-files | grep " " && echo "Filenames should not contain spaces!" && exit 1 || exit 0' + entry: bash + args: + - -c + - 'git ls-files | grep " " && echo "Filenames should not contain spaces!" && exit 1 || exit 0' language: system always_run: true pass_filenames: false