Skip to content

Commit

Permalink
fix edge case of input same as default clobber env
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley Hutson committed Jan 21, 2023
1 parent 3af85f9 commit 74fb64b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/packages/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ func init() {

// if config.INFISICAL_URL is set to the default value, check if INFISICAL_URL is set in the environment
// this is used to allow overrides of the default value
if config.INFISICAL_URL == util.INFISICAL_DEFAULT_URL {
if !rootCmd.Flag("domain").Changed {
if envInfisicalURL, ok := os.LookupEnv("INFISICAL_URL"); ok {
config.INFISICAL_URL = envInfisicalURL
}
}

}

0 comments on commit 74fb64b

Please sign in to comment.