forked from toolshed/abra
		
	fix: collect local name also
This commit is contained in:
		@ -50,6 +50,11 @@ type Secret struct {
 | 
			
		||||
	// Will have this remote name:
 | 
			
		||||
	//   test_example_com_test_pass_two_v2
 | 
			
		||||
	RemoteName string
 | 
			
		||||
 | 
			
		||||
	// LocalName iis the name of the secret in the recipe config. This is also
 | 
			
		||||
	// the name that you pass to `abra app secret insert` and is shown on `abra
 | 
			
		||||
	// app secret list`
 | 
			
		||||
	LocalName string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GeneratePassword generates passwords.
 | 
			
		||||
@ -133,7 +138,12 @@ func ReadSecretsConfig(appEnvPath string, composeFiles []string, stackName strin
 | 
			
		||||
 | 
			
		||||
		lastIdx := strings.LastIndex(secretConfig.Name, "_")
 | 
			
		||||
		secretVersion := secretConfig.Name[lastIdx+1:]
 | 
			
		||||
		value := Secret{Version: secretVersion, RemoteName: secretConfig.Name}
 | 
			
		||||
 | 
			
		||||
		value := Secret{
 | 
			
		||||
			Version:    secretVersion,
 | 
			
		||||
			RemoteName: secretConfig.Name,
 | 
			
		||||
			LocalName:  secretId,
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if len(value.RemoteName) > config.MAX_DOCKER_SECRET_LENGTH {
 | 
			
		||||
			return nil, errors.New(i18n.G("secret %s is > %d chars when combined with %s", secretId, config.MAX_DOCKER_SECRET_LENGTH, stackName))
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user