From 781ba9580aa38c4aebadf69e7149fa62af9ad0f3 Mon Sep 17 00:00:00 2001 From: Adam Hawkins Date: Fri, 21 Jul 2017 21:24:51 +0530 Subject: [PATCH] Fix variable name in git precommit example (#2529) echo "jsfiles" will not work. The example references a variable, not a static string. This commit makes the example functionally correct. --- docs/en/usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/usage.md b/docs/en/usage.md index 7e421f561..75332e1a9 100644 --- a/docs/en/usage.md +++ b/docs/en/usage.md @@ -154,10 +154,10 @@ jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.jsx\?$' | tr [ -z "$jsfiles" ] && exit 0 # Prettify all staged .js files -echo "jsfiles" | xargs ./node_modules/.bin/prettier --write +echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write # Add back the modified/prettified files to staging -echo "jsfiles" | xargs git add +echo "$jsfiles" | xargs git add exit 0 ```