Skip to content

Commit

Permalink
fix(cli): allow developer overwrite of entire server url (#3697)
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren committed Feb 28, 2024
1 parent 2a2df47 commit 288848d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cli/config/configurator.go
Expand Up @@ -158,10 +158,14 @@ func (c Configurator) createConfig(serverURL string) (Config, error) {
return Config{}, err
}

if strings.Contains(serverURL, DefaultCloudDomain) {
path = DefaultCloudPath
} else if !strings.HasSuffix(path, "/api") {
path = strings.TrimSuffix(path, "/") + "/api"
if os.Getenv("TRACETEST_DEV_FORCE_URL") != "true" {
if strings.Contains(serverURL, DefaultCloudDomain) {
path = DefaultCloudPath
} else if !strings.HasSuffix(path, "/api") {
path = strings.TrimSuffix(path, "/") + "/api"
}
} else {
c.ui.Warning("Server path overwritten by TRACETEST_DEV_FORCE_URL")
}

return Config{
Expand Down

0 comments on commit 288848d

Please sign in to comment.