mirror of
https://github.com/mikefarah/yq.git
synced 2025-02-28 11:08:20 +00:00
better troubleshooting
This commit is contained in:
parent
7598f73204
commit
3e0da390ee
@ -50,6 +50,9 @@ Use an environment variable with the `strenv` operator to inject the contents fr
|
||||
LICENSE=$(cat LICENSE) yq eval -n '.a = strenv(LICENSE)'
|
||||
```
|
||||
|
||||
Note that `bash` substitution "$(..)" trims newlines, this will cause string blocks to start with `|-` instead of `|`. If you want to keep your nice trailing newline, read more [here](https://mikefarah.gitbook.io/yq/operators/string-operators#string-blocks-bash-and-newlines)
|
||||
|
||||
|
||||
## Special characters in strings
|
||||
|
||||
The `strenv` operator is a great way to handle special characters in strings:
|
||||
|
Loading…
Reference in New Issue
Block a user