svcacct: Show successful message after deletion (#4016)

Fix some typo that prevented the command to print a success message
when a service account is deleted.
This commit is contained in:
Anis Elleuch
2022-03-11 15:09:46 -08:00
committed by GitHub
parent bd00af5a71
commit 869c875967
+5 -1
View File
@@ -18,8 +18,10 @@
package cmd
import (
"github.com/fatih/color"
"github.com/minio/cli"
"github.com/minio/mc/pkg/probe"
"github.com/minio/pkg/console"
)
var adminUserSvcAcctRemoveCmd = cli.Command{
@@ -54,6 +56,8 @@ func checkAdminUserSvcAcctRemoveSyntax(ctx *cli.Context) {
// mainAdminUserSvcAcctRemove is the handle for "mc admin user svcacct rm" command.
func mainAdminUserSvcAcctRemove(ctx *cli.Context) error {
console.SetColor("SVCMessage", color.New(color.FgGreen))
checkAdminUserSvcAcctRemoveSyntax(ctx)
// Get the alias parameter from cli
@@ -69,7 +73,7 @@ func mainAdminUserSvcAcctRemove(ctx *cli.Context) error {
fatalIf(probe.NewError(e).Trace(args...), "Unable to remove a new service account")
printMsg(svcAcctMessage{
op: "ls",
op: "rm",
AccessKey: svcAccount,
})