Skip to content

Commit 6ef31e1

Browse files
authored
RSDK-9978 - fix profile updating (viamrobotics#4837)
1 parent 1b773b3 commit 6ef31e1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cli/profile.go

+14
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ func addOrUpdateProfile(c *cli.Context, args addOrUpdateProfileArgs, isAdd bool)
7979
addOrUpdate = "added"
8080
} else {
8181
addOrUpdate = "updated"
82+
83+
conf, err := configFromCacheInner(getCLIProfilePath(profile.Name))
84+
if err != nil {
85+
return err
86+
}
87+
88+
conf.Auth = &profile.APIKey
89+
conf.profile = profile.Name
90+
91+
// if we're updating, make sure we actually store the updated config
92+
err = storeConfigToCache(conf)
93+
if err != nil {
94+
return err
95+
}
8296
}
8397

8498
printf(c.App.Writer, "Successfully %s profile %s", addOrUpdate, args.ProfileName)

0 commit comments

Comments
 (0)