Skip to content

Commit

Permalink
Merge pull request #3006 from akhilmhdh/feat/region-flag
Browse files Browse the repository at this point in the history
Added region flag for eu in cli
  • Loading branch information
maidul98 authored Jan 22, 2025
2 parents 14f895c + b7be6bd commit 1d5b629
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/packages/cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,11 @@ var loginCmd = &cobra.Command{
credential, err := authStrategies[strategy](cmd, infisicalClient)

if err != nil {
util.HandleError(fmt.Errorf("unable to authenticate with %s [err=%v]", formatAuthMethod(loginMethod), err))
euErrorMessage := ""
if strings.HasPrefix(config.INFISICAL_URL, util.INFISICAL_DEFAULT_US_URL) {
euErrorMessage = fmt.Sprintf("\nIf you are using the Infisical Cloud Europe Region, please switch to it by using the \"--domain %s\" flag.", util.INFISICAL_DEFAULT_EU_URL)
}
util.HandleError(fmt.Errorf("unable to authenticate with %s [err=%v].%s", formatAuthMethod(loginMethod), err, euErrorMessage))
}

if plainOutput {
Expand Down
1 change: 1 addition & 0 deletions docs/cli/commands/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ description: "Infisical CLI command overview"
| `init` | Used to link a local project to the platform. |
| `run` | Used to inject envars from the platform into an application process. |
| `vault` | Used to manage where your login credentials are stored at rest |

## Global options

| Option | Description |
Expand Down

0 comments on commit 1d5b629

Please sign in to comment.