mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 18:24:35 +02:00
flake/generate-files: fix --commit
line count
`echo` pipes all its output at once, so `wc -l` always counts 1 line. See https://stackoverflow.com/questions/60954221
This commit is contained in:
parent
9314cd46f0
commit
8945b3b5e3
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,8 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
# Construct the commit message based on the body
|
# Construct the commit message based on the body
|
||||||
count=$(echo -n "$body" | wc -l)
|
# NOTE: Can't use `wc -l` due to how `echo` pipes its output
|
||||||
|
count=$(echo -n "$body" | awk 'END {print NR}')
|
||||||
if [ "$count" -gt 1 ] || [ ''${#body} -gt 50 ]; then
|
if [ "$count" -gt 1 ] || [ ''${#body} -gt 50 ]; then
|
||||||
msg=$(echo -e "generated: Update\n\n$body")
|
msg=$(echo -e "generated: Update\n\n$body")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue