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.
This commit is contained in:
Adam Hawkins authored and Christopher Chedeau committed 2017-07-21 08:54:51 -07:00
1 parent 4a0e9475df
commit 781ba9580a
1 file changed
+2 -2
+2 -2
View File
@@ -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
```