Merge pull request #3006 from akhilmhdh/feat/region-flag

Added region flag for eu in cli
This commit is contained in:
Maidul Islam
2025-01-22 13:21:14 -05:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -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 {

View File

@@ -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 |