fix(bash): deal with newlines better

This commit is contained in:
matt1432 2023-12-10 16:14:07 -05:00
parent 1b051c8266
commit 1f9e3512b6

View file

@ -6,10 +6,11 @@
grep -v -e "On branch" \
-e "up to date" \
-e 'use "git' \
-e "nothing to commit" |
sed '/^$/d')
-e "nothing to commit")
if [ "$GIT" != "" ]; then
CHECK=$(echo "$GIT" | sed '/^$/d')
if [ "$CHECK" != "" ]; then
echo "$GIT"
echo
fi