Skip to content

Commit

Permalink
override the domain in more places (#1463)
Browse files Browse the repository at this point in the history
  • Loading branch information
melugoyal authored and kushalmalani committed Nov 30, 2023
1 parent 4764527 commit aa8adb5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/cloud/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ func checkAPIKeys(astroClient astro.Client, coreClient astrocore.CoreClient, isD
c, err := context.GetCurrentContext() // get current context
if err != nil {
// set context
domain := defaultDomain
var domain string
if domain = os.Getenv("ASTRO_DOMAIN"); domain == "" {
domain = defaultDomain
}
if !context.Exists(domain) {
err := context.SetContext(domain)
if err != nil {
Expand Down Expand Up @@ -369,7 +372,10 @@ func checkAPIToken(isDeploymentFile bool, coreClient astrocore.CoreClient) (bool
c, err := context.GetCurrentContext() // get current context
if err != nil {
// set context
domain := defaultDomain
var domain string
if domain = os.Getenv("ASTRO_DOMAIN"); domain == "" {
domain = defaultDomain
}
if !context.Exists(domain) {
err := context.SetContext(domain)
if err != nil {
Expand Down

0 comments on commit aa8adb5

Please sign in to comment.