Merge pull request #17 from loanDepot/kmarquette/issue-16

add better handling of $null values when setting the version
This commit is contained in:
Kevin Marquette
2018-10-16 10:55:52 -07:00
committed by GitHub

View File

@@ -62,12 +62,8 @@ 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))
{