Skip to content

Commit

Permalink
Update CloneTentacleInstance.ps1
Browse files Browse the repository at this point in the history
Changed $portNumber value to use `System.Uri`. This will allow it to account for trailing slashes in the `Endpoint.Uri` coming from the Octopus API and prevent inequality evaluations on line 113.
  • Loading branch information
Cory authored Sep 22, 2022
1 parent be10fe4 commit d39709a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CloneTentacleInstance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function Compare-TentacleWithMachineRegistration
return $true
}

$portNumber = ($machineRegistration.EndPoint.Uri -split ":")[2]
$portNumber = ([System.Uri]$machineRegistration.EndPoint.Uri).Port
if ($localTentacle.Tentacle.Services.PortNumber -eq $portNumber)
{
Write-OctopusSuccess "The machine $($machineRegistration.Id):$($machineRegistration.Name) port $($localTentacle.Tentacle.Services.PortNumber) matches port number $portNumber"
Expand Down

0 comments on commit d39709a

Please sign in to comment.