mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skip nested YAML structures
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
c096bc6022
commit
5a89789ba7
2 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,7 @@ if ( [String]::IsNullOrEmpty($Version) ) {
|
|||
$yaml = Get-Content -Path "$PROJECT_DIR\cicd\shared-gh-workflows-context.yml"
|
||||
$dict_versions = @{}
|
||||
$yaml | ForEach-Object {
|
||||
if ( $_.Name.Trim().EndsWith(":") ) { return } # This is likely a nested structure
|
||||
$val1, $val2 = $_ -split ": "
|
||||
$dict_versions[$val1] = $val2.Trim("""")
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ function Write-Result($result, $ForegroundColor="Green") {
|
|||
$yaml = Get-Content -Path "$PROJECT_DIR\cicd\shared-gh-workflows-context.yml"
|
||||
$dict_versions = @{}
|
||||
$yaml | ForEach-Object {
|
||||
if ( $_.Name.Trim().EndsWith(":") ) { return } # This is likely a nested structure
|
||||
$val1, $val2 = $_ -split ": "
|
||||
$dict_versions[$val1] = $val2.Trim("""")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue