Last active
November 19, 2018 17:50
-
-
Save nyanhp/90bbdf328d26eb4b126a25b718d39073 to your computer and use it in GitHub Desktop.
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
<# | |
Both files for my tests simply contained | |
{ bla = 'value } | |
and | |
{ bla = 'UserDefinedValue' } | |
#> | |
$d = @" | |
ResolutionPrecedence: | |
- $(Join-Path -Path $home -ChildPath 'AutomatedLab\settings.psd1') | |
- $(Join-Path (Get-Module AutomatedLab -List)[0].ModuleBase 'Datum\settings.psd1') | |
default_lookup_options: MostSpecific | |
merge_hash: Unique | |
merge_baseType_array: Unique | |
merge_hash_array: DeepTuple | |
DatumStructure: | |
- StoreName: Settings | |
StoreProvider: Datum::File | |
StoreOptions: | |
Path: $(Join-Path (Get-Module AutomatedLab -List)[0].ModuleBase 'Datum\settings.psd1') | |
- StoreName: Settings | |
StoreProvider: Datum::File | |
StoreOptions: | |
Path: $(Join-Path -Path $home -ChildPath 'AutomatedLab\settings.psd1') | |
"@ | ConvertFrom-Yaml | |
$datum = New-DatumStructure -DatumHierarchyDefinition $d |
for reference: https://github.com/gaelcolas/Datum#lookup-merging-behaviour
lookup_options:
<Key Name>: MostSpecific/First|hash/MergeTopKeys|deep/MergeRecursively
<Other Key>:
merge_hash: MostSpecific/First|deep|hash/*
merge_basetype_array: MostSpecific/First|Sum/Add|Unique
merge_hash_array: MostSpecific/First|Sum|DeepTuple/DeepItemMergeByTuples|UniqueKeyValTuples
merge_options:
knockout_prefix: --
tuple_keys:
- Name
- Version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try this yaml instead (adapting few bits maybe):