Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit 5f712b5

Browse files
committed
devops: Give path priority when supplied
If the user supplies the path, give it priority for setting for setting `TargetUri.ActualUri`. Needed for DevOps urls which require host/path[0] to authenticate
1 parent afedbe1 commit 5f712b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Shared/Cli/OperationArguments.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,13 @@ internal virtual void CreateTargetUri()
743743

744744
queryUrl = buffer.ToString();
745745

746+
// if path is specified we should give the host/path priority
747+
if (!string.IsNullOrWhiteSpace(_queryPath))
748+
{
749+
actualUrl = queryUrl;
750+
}
746751
// If the actual-url override has been set, honor it.
747-
if (!string.IsNullOrEmpty(_urlOverride))
752+
else if (!string.IsNullOrEmpty(_urlOverride))
748753
{
749754
if (Uri.TryCreate(_urlOverride, UriKind.Absolute, out Uri uri))
750755
{

0 commit comments

Comments
 (0)