From 5f712b59c93554bb3e314f76def57ad19c6253c7 Mon Sep 17 00:00:00 2001 From: Jessica Schumaker Date: Tue, 25 Sep 2018 16:35:21 -0400 Subject: [PATCH] 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 --- Shared/Cli/OperationArguments.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Shared/Cli/OperationArguments.cs b/Shared/Cli/OperationArguments.cs index 17e5023ca..38b719523 100644 --- a/Shared/Cli/OperationArguments.cs +++ b/Shared/Cli/OperationArguments.cs @@ -743,8 +743,13 @@ internal virtual void CreateTargetUri() queryUrl = buffer.ToString(); + // if path is specified we should give the host/path priority + if (!string.IsNullOrWhiteSpace(_queryPath)) + { + actualUrl = queryUrl; + } // If the actual-url override has been set, honor it. - if (!string.IsNullOrEmpty(_urlOverride)) + else if (!string.IsNullOrEmpty(_urlOverride)) { if (Uri.TryCreate(_urlOverride, UriKind.Absolute, out Uri uri)) {