prettybad: Have yq output tabs instead of spaces

It's a hack with `sed`, but it's better than nothing.
This commit is contained in:
Ethan P. 2024-08-24 14:22:18 -07:00
parent 1cffc910d5
commit 6092fa5bad
No known key found for this signature in database
GPG Key ID: B29B90B1B228FEBC

View File

@ -207,7 +207,8 @@ formatter_yq_process() {
*.json) args+=(--output-format json) ;;
esac
yq --prettyPrint --indent 2 "${args[@]}"
yq --prettyPrint --indent 4 "${args[@]}" \
| sed -e ':l' -e 's/^\(\t*\) /\1\t/g; t l'
return $?
}