1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-25 13:51:57 +00:00

fix(template.sh): fix space issue

An additional number of new lines may be printed when the final result is printed.
This commit is contained in:
Ghasem Shirdel 2022-01-18 12:05:19 +03:30 committed by GitHub
parent 0c54b565f4
commit 66ffeacafd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,15 +101,25 @@ octo-org/octo-repo#100\n\n"
scope="(${scope})"
fi
if [ ! -z "$breaking_changes" ]; then
breaking_changes="BREAKING CHANGE: ${breaking_changes}"
massage="\n ${GREEN}${type_var}${scope}: ${short_desc}\n"
if [ ! -z "$long_desc" ] || [ ! -z "$breaking_changes" ] || [ ! -z "$closed_issues" ]; then
massage="${massage}\n"
fi
printf "\n ${GREEN}${type_var}${scope}: ${short_desc}
if [ ! -z "$long_desc" ]; then
massage="${massage} ${long_desc}\n"
fi
${long_desc}
${breaking_changes}
${closed_issues}${RESET}\n\n"
if [ ! -z "$breaking_changes" ]; then
massage="${massage} BREAKING CHANGE: ${breaking_changes}\n"
fi
if [ ! -z "$closed_issues" ]; then
massage="${massage} ${closed_issues}\n"
fi
printf "${massage}\n${RESET}"
# Git commit
result_code=$?