From 64d533a833bdada9f97182079ea71ab599a15ea3 Mon Sep 17 00:00:00 2001 From: psedge Date: Fri, 16 Jul 2021 11:22:58 +0200 Subject: [PATCH] Change README.md for hook to support filenames with spaces --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9eb0ad977..8ee65afab 100644 --- a/README.md +++ b/README.md @@ -77,13 +77,13 @@ For baselines older than version 0.9, just recreate it. **Scanning Staged Files Only:** ```bash -$ detect-secrets-hook --baseline .secrets.baseline $(git diff --staged --name-only) +$ git diff --staged --name-only -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline ``` **Scanning All Tracked Files:** ```bash -$ detect-secrets-hook --baseline .secrets.baseline $(git ls-files) +$ git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline ``` ### Viewing All Enabled Plugins: