-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(redo)Only re-encode subst value if it smells like json and target do…
…c is yaml (#796) * Improve handling of substitution values wrt json or yaml encoding. If target is json then of course value must be json. Not much to talk about there. However if target is yaml and value is json then we would like to convert the json to yaml first so we don't have a target that looks like a mix of yaml and json. That said, if value and target are both yaml then we would like to preserve whatever is in the value. e.g. anchors and refs, string styles etc. * In SubstituteByData, only re-encode value to yaml if the value bytes look like json and if the target file is not json. * Only perform json sniff if target isn't json * Fix small typo in sniffJson regex --------- Co-authored-by: Hilmar Falkenberg <[email protected]>
- Loading branch information
Showing
2 changed files
with
79 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters