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:
Calvin Leung Huang
2017-08-16 14:31:16 -04:00
committed by GitHub
parent 1d03ad7420
commit 82c5118500
2 changed files with 10 additions and 5 deletions

View File

@@ -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
}

View File

@@ -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
}