Closed X-Guardian closed 5 years ago
If Test-PublishMetadata is run against a DSC example that contains file metadata with an invalid GUID, an exception is thrown.
Test-PublishMetadata
Example: PowerShell/xActiveDirectory#409
Test-PublishMetadata -Path invalid_example_config.ps1 InvalidGuid,Test-ScriptFileInfo At \DscResource.Tests\DscResource.GalleryDeploy\DscResource.GalleryDeploy.psm1:302 char:17 + throw $_ + ~~~~~~~~ + CategoryInfo : OperationStopped: (InvalidGuid,Test-ScriptFileInfo:String) [], RuntimeException + FullyQualifiedErrorId : InvalidGuid,Test-ScriptFileInfo
Add processing for this error to the Test-PublishMetdadata function so that only a warning is shown, and improve the unknown error throw by outputting the file details as well as the error.
Test-PublishMetdadata
Details of the problem, bug, or enhancement
If
Test-PublishMetadata
is run against a DSC example that contains file metadata with an invalid GUID, an exception is thrown.Example: PowerShell/xActiveDirectory#409
Verbose logs showing the problem (if applicable)
Suggested solution to the issue
Add processing for this error to the
Test-PublishMetdadata
function so that only a warning is shown, and improve the unknown error throw by outputting the file details as well as the error.