Skip to content

Commit

Permalink
Handle virtual directories a bit better
Browse files Browse the repository at this point in the history
  • Loading branch information
BobJWalker committed Aug 13, 2020
1 parent 54d80b0 commit 6cc6573
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DataAccess/OctopusDataAdapter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ function Get-OctopusUrl

if ($EndPoint -match "/api")
{
return "$OctopusUrl/$endPoint"
if (!$EndPoint.StartsWith("/api"))
{
$EndPoint = $EndPoint.Substring($EndPoint.IndexOf("/api"))
}

return "$OctopusUrl/$EndPoint"
}

if ([string]::IsNullOrWhiteSpace($SpaceId))
Expand Down

0 comments on commit 6cc6573

Please sign in to comment.