diff --git a/BuildTasks/SetVersion.Task.ps1 b/BuildTasks/SetVersion.Task.ps1 index bb023f7..1587856 100644 --- a/BuildTasks/SetVersion.Task.ps1 +++ b/BuildTasks/SetVersion.Task.ps1 @@ -62,14 +62,10 @@ task SetVersion { "Downloading published module to check for breaking changes" $publishedModule | Save-Module -Path $downloadFolder - [System.Collections.Generic.HashSet[string]] $publishedInterface = GetModulePublicInterfaceMap -Path (Join-Path $downloadFolder $ModuleName) - [System.Collections.Generic.HashSet[string]] $buildInterface = GetModulePublicInterfaceMap -Path $ManifestPath - if ($null -eq $publishedInterface) - { - $publishedInterface = [System.Collections.Generic.HashSet[string]]::new() - } + [System.Collections.Generic.HashSet[string]] $publishedInterface = @(GetModulePublicInterfaceMap -Path (Join-Path $downloadFolder $ModuleName)) + [System.Collections.Generic.HashSet[string]] $buildInterface = @(GetModulePublicInterfaceMap -Path $ManifestPath) - if( -not $publishedInterface.IsSubsetOf($buildInterface)) + if (-not $publishedInterface.IsSubsetOf($buildInterface)) { $bumpVersionType = 'Major' }