From 3f58fc5f6dce5f586fcd0e87e41f61b2249f4314 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Tue, 9 Aug 2022 13:42:18 +0200 Subject: [PATCH] `Get-ClassResourceProperty`: Fix more limited wildcard search (#123) --- CHANGELOG.md | 5 +++++ source/Private/Get-ClassResourceProperty.ps1 | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fa0c1d..7088de9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- `Get-ClassResourceProperty` + - Now does a more limited wildcard search for the class script file ([issue #122](https://github.com/dsccommunity/DscResource.DocGenerator/issues/122)). + ## [0.11.0] - 2022-05-10 ### Changed diff --git a/source/Private/Get-ClassResourceProperty.ps1 b/source/Private/Get-ClassResourceProperty.ps1 index ecad583..f06ef12 100644 --- a/source/Private/Get-ClassResourceProperty.ps1 +++ b/source/Private/Get-ClassResourceProperty.ps1 @@ -44,7 +44,7 @@ function Get-ClassResourceProperty { $dscResourceAst = Get-ClassAst -ClassName $currentClassName -ScriptFile $BuiltModuleScriptFilePath - $sourceFilePath = Join-Path -Path $SourcePath -ChildPath ('Classes/*{0}.ps1' -f $currentClassName) + $sourceFilePath = Join-Path -Path $SourcePath -ChildPath ('Classes/???.{0}.ps1' -f $currentClassName) $dscResourceCommentBasedHelp = Get-CommentBasedHelp -Path $sourceFilePath