mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-04 04:28:08 +00:00 
			
		
		
		
	Improve auth-enable output for plugin backends (#3189)
* Improve auth-enable output for plugin backends * Unquote authType on final output
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							1d03ad7420
						
					
				
				
					commit
					82c5118500
				
			@@ -64,9 +64,14 @@ func (c *AuthEnableCommand) Run(args []string) int {
 | 
			
		||||
		return 2
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	authTypeOutput := fmt.Sprintf("'%s'", authType)
 | 
			
		||||
	if authType == "plugin" {
 | 
			
		||||
		authTypeOutput = fmt.Sprintf("plugin '%s'", pluginName)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	c.Ui.Output(fmt.Sprintf(
 | 
			
		||||
		"Successfully enabled '%s' at '%s'!",
 | 
			
		||||
		authType, path))
 | 
			
		||||
		"Successfully enabled %s at '%s'!",
 | 
			
		||||
		authTypeOutput, path))
 | 
			
		||||
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -74,14 +74,14 @@ func (c *MountCommand) Run(args []string) int {
 | 
			
		||||
		return 2
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mountPart := fmt.Sprintf("'%s'", mountType)
 | 
			
		||||
	mountTypeOutput := fmt.Sprintf("'%s'", mountType)
 | 
			
		||||
	if mountType == "plugin" {
 | 
			
		||||
		mountPart = fmt.Sprintf("plugin '%s'", pluginName)
 | 
			
		||||
		mountTypeOutput = fmt.Sprintf("plugin '%s'", pluginName)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	c.Ui.Output(fmt.Sprintf(
 | 
			
		||||
		"Successfully mounted %s at '%s'!",
 | 
			
		||||
		mountPart, path))
 | 
			
		||||
		mountTypeOutput, path))
 | 
			
		||||
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user