Closed HackXIt closed 1 year ago
Ok, in an attempt to figure it out, I added (( merge on get ))
to both file1 and file2. Now it works as intended.
It was not clear from the documentation that every file that is going to be merge needs to have that operator placed. I'm unsure if that's expected or if it's faulty behaviour.
Any help or pinpointing to where it says that in the documentation would be greatly appreciated.
I downloaded the latest version of spruce (v1.30.2) on windows and I'm running into weird behavior.
I'm fairly new to using spruce, so I've been going off from the documentation directly.
The problem: When executing
spruce merge .\base.yml .\file1.yml .\file2.yml
, I get an array, where the first element always gets overwritten, instead of being appended, even though I specifically added(( merge on get ))
. According to doc/array-merging, it is supposed to change the identifier that is used to determine if an element already exists and should be overwritten or if it is a new element.These are my test files: base.yml
file1.yml
file2.yml
It works as expected when I change the key
get
toname
. It seems to me as if my provided operator inbase.yml
is simply ignored.Output when using
get
as identifier:Output when changing file1 and file2 to use
name
as identifier:In both cases I left
base.yml
as is, with the(( merge on get ))
operator placed.