Permalink
Browse files

Fix nil pointer when using devspace cloud

  • Loading branch information...
FabianKramm committed Oct 19, 2018
1 parent fc89358 commit 6aaa24640f84608588fa673cc6355e29127de40b
Showing with 11 additions and 4 deletions.
  1. +11 −4 pkg/devspace/cloud/config.go
@@ -40,6 +40,7 @@ const GetClusterConfigEndpoint = "/clusterConfig"
// DevSpaceCloudProviderConfig holds the information for the devspace-cloud
var DevSpaceCloudProviderConfig = &Provider{
Name: DevSpaceCloudProviderName,
Host: "http://cli.devspace-cloud.com",
}
@@ -84,16 +85,22 @@ func SaveCloudConfig(config ProviderConfig) error {
}
cfgPath := filepath.Join(homedir, DevSpaceCloudConfigPath)
saveConfig := ProviderConfig{}
for name, provider := range config {
provider.Name = ""
host := provider.Host
if name == DevSpaceCloudProviderName {
provider.Host = ""
host = ""
}
saveConfig[name] = &Provider{
Name: "",
Host: host,
Token: provider.Token,
}
}
out, err := yaml.Marshal(config)
out, err := yaml.Marshal(saveConfig)
if err != nil {
return err
}

0 comments on commit 6aaa246

Please sign in to comment.