Skip to content

Commit

Permalink
Fix return when passing -Current
Browse files Browse the repository at this point in the history
  • Loading branch information
igoravl committed Sep 10, 2015
1 parent 6132eae commit 58647d2
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Function Get-TfsConfigurationServer

Process
{
if ($Current)
{
return $Global:TfsServerConnection
}

if ($Server -is [Microsoft.TeamFoundation.Client.TfsConfigurationServer])
{
return $Server
Expand All @@ -46,14 +51,6 @@ Function Get-TfsConfigurationServer
$Server = $null
}

if ($Server -eq $null)
{
if ($Global:TfsServerConnection)
{
return $Global:TfsServerConnection
}
}

throw "No TFS connection information available. Either supply a valid -Server argument or use Connect-TfsConfigurationServer prior to invoking this cmdlet."
}
}
Expand Down

0 comments on commit 58647d2

Please sign in to comment.