Skip to content

Commit 3d71362

Browse files
committed
Fixing the Endpoint parameter issue
1 parent a359862 commit 3d71362

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ internal IHDInsightClient GetClient()
4747
this.CurrentSubscription,
4848
client.GetEnvironmentOrDefault(this.CurrentSubscription.Environment),
4949
client.Profile);
50-
subscriptionCredentials.Endpoint = this.Endpoint;
50+
51+
if (this.Endpoint.IsNotNull())
52+
{
53+
subscriptionCredentials.Endpoint = this.Endpoint;
54+
}
55+
5156
var clientInstance = ServiceLocator.Instance.Locate<IAzureHDInsightClusterManagementClientFactory>().Create(subscriptionCredentials);
5257
clientInstance.SetCancellationSource(this.tokenSource);
5358
if (this.Logger.IsNotNull())

0 commit comments

Comments
 (0)