Skip to content

Commit

Permalink
Exception in New-GitHubRepository when specifying TeamId (#196)
Browse files Browse the repository at this point in the history
Incorrectly used `$PSBoundParameters.Contains` instead of
`$PSBoundParameters.ContainsKey`.

Resolves #195
  • Loading branch information
HowardWolosky authored May 29, 2020
1 parent b4439f4 commit 587e204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GitHubRepositories.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function New-GitHubRepository
$uriFragment = "orgs/$OrganizationName/repos"
}

if ($PSBoundParameters.ContainsKey('TeamId') -and (-not $PSBoundParameters.Contains('OrganizationName')))
if ($PSBoundParameters.ContainsKey('TeamId') -and (-not $PSBoundParameters.ContainsKey('OrganizationName')))
{
$message = 'TeamId may only be specified when creating a repository under an organization.'
Write-Log -Message $message -Level Error
Expand Down

0 comments on commit 587e204

Please sign in to comment.