mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
fix(collect): properly set secret when overriding with flags
This commit is contained in:
parent
e4a521971a
commit
939be12da7
1 changed files with 1 additions and 3 deletions
|
|
@ -91,7 +91,6 @@ var CollectCmd = &cobra.Command{
|
|||
s.Password = password
|
||||
}
|
||||
case *secrets.LocalSecretStore:
|
||||
tmpSecrets := make(map[string]string)
|
||||
for k, _ := range s.Secrets {
|
||||
if creds, err := bmc.GetBMCCredentials(store, k); err != nil {
|
||||
log.Error().Str("id", k).Err(err).Msg("failed to get BMC credentials from secret store")
|
||||
|
|
@ -106,11 +105,10 @@ var CollectCmd = &cobra.Command{
|
|||
if newCreds, err := json.Marshal(creds); err != nil {
|
||||
log.Error().Str("id", k).Err(err).Msg("failed to marshal updated BMC credentials")
|
||||
} else {
|
||||
tmpSecrets[k] = string(newCreds)
|
||||
s.StoreSecretByID(k, string(newCreds))
|
||||
}
|
||||
}
|
||||
}
|
||||
store.(*secrets.LocalSecretStore).Secrets = tmpSecrets
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue