fix: Remove trailing newlines from yaml arrays (#73)
Trailing newlines is something that we will never need as an information, so it can only cause issues with parsing yaml values. I scratched my head for 10 minutes on why my variable has a trailing newline when I use `readarray -t` everywhere. Then I remembered get_yaml_array function. This should not affect current working modules at all, but it would be good to test before landing. Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
This commit is contained in:
parent
2a85c2732b
commit
411e782dc8
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_yaml_array() {
|
||||
readarray "$1" < <(echo "$3" | yq -I=0 "$2")
|
||||
readarray -t "$1" < <(echo "$3" | yq -I=0 "$2")
|
||||
}
|
||||
|
||||
export -f get_yaml_array
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue