add better handling of $null values when setting the version

This commit is contained in:
Kevin Marquette
2018-10-16 09:09:10 -07:00
parent e7e2612082
commit 915ccb5dbc

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))
{