Skip to content

Commit

Permalink
Merge pull request #525 from newrelic/regionEqualFold
Browse files Browse the repository at this point in the history
fix(install): ignore region string case when checking profile
  • Loading branch information
Julien4218 authored Dec 17, 2020
2 parents 8e09fa1 + 6ed10a0 commit 7102c75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/install/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package install
import (
"errors"
"fmt"
"strings"

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -66,7 +67,7 @@ func assertProfileIsValid(profile *credentials.Profile) error {
if profile == nil {
return errors.New("default profile has not been set")
}
if profile.Region != "US" {
if !strings.EqualFold(profile.Region, "US") {
return fmt.Errorf("only the US region is supported at this time. region %s is not supported", profile.Region)
}
return nil
Expand Down

0 comments on commit 7102c75

Please sign in to comment.