forked from toolshed/abra
		
	fix: warn if secrets still exist
This commit is contained in:
		| @ -140,7 +140,12 @@ func GenerateSecrets(secretEnvVars map[string]string, appName, server string) (m | ||||
| 					return | ||||
| 				} | ||||
| 				if err := client.StoreSecret(secretRemoteName, passwords[0], server); err != nil { | ||||
| 					ch <- err | ||||
| 					if strings.Contains(err.Error(), "AlreadyExists") { | ||||
| 						logrus.Warnf("%s already exists, moving on...", secretRemoteName) | ||||
| 						ch <- nil | ||||
| 					} else { | ||||
| 						ch <- err | ||||
| 					} | ||||
| 					return | ||||
| 				} | ||||
| 				secrets[secretName] = passwords[0] | ||||
| @ -151,7 +156,13 @@ func GenerateSecrets(secretEnvVars map[string]string, appName, server string) (m | ||||
| 					return | ||||
| 				} | ||||
| 				if err := client.StoreSecret(secretRemoteName, passphrases[0], server); err != nil { | ||||
| 					ch <- err | ||||
| 					if strings.Contains(err.Error(), "AlreadyExists") { | ||||
| 						logrus.Warnf("%s already exists, moving on...", secretRemoteName) | ||||
| 						ch <- nil | ||||
| 					} else { | ||||
| 						ch <- err | ||||
| 					} | ||||
| 					return | ||||
| 				} | ||||
| 				secrets[secretName] = passphrases[0] | ||||
| 			} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user