diff --git a/cmd/earthly/base/buildkit.go b/cmd/earthly/base/buildkit.go index c385e4a6..3e62f48f 100644 --- a/cmd/earthly/base/buildkit.go +++ b/cmd/earthly/base/buildkit.go @@ -88,16 +88,15 @@ func (cli *CLI) ConfigureSatellite(cliCtx *cli.Context, cloudClient *cloud.Clien } else { cli.Console().Warnf("TLS has been disabled; this should never be done when connecting to Earthly's production API\n") } - + cli.Flags().BuildkitdSettings.SatelliteName = satelliteName + cli.Flags().BuildkitdSettings.SatelliteDisplayName = cli.Flags().SatelliteName + cli.Flags().BuildkitdSettings.SatelliteOrgID = orgID cli.Flags().BuildkitdSettings.SatelliteIsManaged = sat.IsManaged satelliteAddress := cli.Flags().SatelliteAddress - if !sat.IsManaged { + if !sat.IsManaged && satelliteAddress == "" { // A self-hosted satellite uses its own address satelliteAddress = fmt.Sprintf("tcp://%s", sat.Address) } - cli.Flags().BuildkitdSettings.SatelliteName = satelliteName - cli.Flags().BuildkitdSettings.SatelliteDisplayName = cli.Flags().SatelliteName - cli.Flags().BuildkitdSettings.SatelliteOrgID = orgID if satelliteAddress != "" { cli.Flags().BuildkitdSettings.BuildkitAddress = satelliteAddress } else {