You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2017/07/17 12:06:14 UTC

[07/18] brooklyn-client git commit: Don't store all old logins in .brooklyn_cli

Don't store all old logins in .brooklyn_cli


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/2ac0e7a1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/2ac0e7a1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/2ac0e7a1

Branch: refs/heads/master
Commit: 2ac0e7a12e004c507203430a522cfd44b4a83227
Parents: 326459c
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Tue May 23 17:42:16 2017 +0100
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Tue Jul 4 11:06:00 2017 +0100

----------------------------------------------------------------------
 cli/commands/login.go | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/2ac0e7a1/cli/commands/login.go
----------------------------------------------------------------------
diff --git a/cli/commands/login.go b/cli/commands/login.go
index 84e13b3..d7ddb7e 100644
--- a/cli/commands/login.go
+++ b/cli/commands/login.go
@@ -111,11 +111,8 @@ func (cmd *Login) Run(scope scope.Scope, c *cli.Context) {
 		cmd.config.Map = make(map[string]interface{})
 	}
 	// now persist these credentials to the yaml file
-	auth, ok := cmd.config.Map["auth"].(map[string]interface{})
-	if !ok {
-		auth = make(map[string]interface{})
-		cmd.config.Map["auth"] = auth
-	}
+	auth := make(map[string]interface{})
+	cmd.config.Map["auth"] = auth
 
 	auth[cmd.network.BrooklynUrl] = map[string]string{
 		"username": cmd.network.BrooklynUser,