kgranroth-tm commented on issue #115:
URL:
https://github.com/apache/cloudstack-cloudmonkey/issues/115#issuecomment-1513792981
An incredibly quick glance at the code suggests that the core problem is
that `LoadCache` is only ever called while reading the config and never when
setting the profile, thus it only ever recognizes the config's profile.
An even quicker experimental fix does appear to work for me in all of my
tests:
```
git diff
diff --git a/config/config.go b/config/config.go
index e9d6a02..245f237 100644
--- a/config/config.go
+++ b/config/config.go
@@ -304,6 +304,7 @@ func (c *Config) LoadProfile(name string) {
conf.Section(name).MapTo(profile)
setActiveProfile(c, profile)
c.Core.ProfileName = name
+ LoadCache(c)
}
// UpdateConfig updates and saves config
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]