From b9e3dae866784fc9e086ef9ab4dad6e25e4f131c Mon Sep 17 00:00:00 2001 From: "denis256.dev-desktop" Date: Mon, 26 Aug 2024 14:35:53 +0100 Subject: [PATCH] Fixed typo in error message, removed unused check Signed-off-by: denis256 --- authentication/environment.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/authentication/environment.go b/authentication/environment.go index cca46dff..adc9c55a 100644 --- a/authentication/environment.go +++ b/authentication/environment.go @@ -106,7 +106,7 @@ func AzureEnvironmentByNameFromEndpoint(ctx context.Context, endpoint string, en } if endpoint == "" { - return nil, fmt.Errorf("unable to locate metadata for environment %q from the built in `public`, `usgoverment`, `china` and no custom metadata host has been specified", environmentName) + return nil, fmt.Errorf("unable to locate metadata for environment %q from the built in `public`, `usgovernment`, `china` and no custom metadata host has been specified", environmentName) } environments, err := getSupportedEnvironments(ctx, endpoint) @@ -147,9 +147,6 @@ func IsEnvironmentAzureStack(ctx context.Context, endpoint string, environmentNa // while the array contains values for _, env := range environments { - if err != nil { - return false, fmt.Errorf("unable to decode environment from %q response: %+v", endpoint, err) - } if strings.EqualFold(env.Name, environmentName) { if !strings.EqualFold(env.Authentication.IdentityProvider, "AAD") || !strings.EqualFold(env.Authentication.Tenant, "common") { return true, nil