Skip to content

Commit

Permalink
Fixed issue in Example Data creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Nov 7, 2024
1 parent fc3094d commit 6486437
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixed an issue where PSCredential objects in an embedded property were
not processed correctly, resulting in an empty hashtable in the example
data file.

## [0.1.22] - 2024-10-15

### Added
Expand Down
10 changes: 9 additions & 1 deletion source/Private/Get-AttributeString.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ function Get-AttributeString
}
else
{
Get-AttributeString -Property $embeddedProperty -ConfigData ($ConfigData.$($Property.Name)[0])
if ($embeddedProperty.EmbeddedInstance -eq "MSFT_Credential")
{
$result = ('{0} | {1} | {2}' -f 'PSCredential', $state, $embeddedProperty.Description)
$ConfigData.$($property.Name)[0].$($embeddedProperty.Name) = $result
}
else
{
Get-AttributeString -Property $embeddedProperty -ConfigData ($ConfigData.$($Property.Name)[0])
}
}
}
}
Expand Down

0 comments on commit 6486437

Please sign in to comment.