From 54a7460fa006642298c6f86a194422b5edc8d5a5 Mon Sep 17 00:00:00 2001 From: Carter McClellan Date: Tue, 11 Jul 2017 09:39:33 -0700 Subject: [PATCH] fix to mc admin (#2207) --- cmd/admin-main.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/admin-main.go b/cmd/admin-main.go index 73e64947..0d60ce98 100644 --- a/cmd/admin-main.go +++ b/cmd/admin-main.go @@ -16,7 +16,10 @@ package cmd -import "github.com/minio/cli" +import ( + "github.com/fatih/color" + "github.com/minio/cli" +) var ( adminFlags = []cli.Flag{} @@ -27,7 +30,7 @@ var adminCmd = cli.Command{ Usage: "Manage Minio servers", Action: mainAdmin, HideHelpCommand: true, - Before: setGlobalsFromContext, + Before: mainAdminBefore, Flags: append(adminFlags, globalFlags...), Subcommands: []cli.Command{ adminServiceCmd, @@ -39,6 +42,11 @@ var adminCmd = cli.Command{ }, } +func mainAdminBefore(ctx *cli.Context) error { + color.Yellow("\t *** Warning:Experiment feature. Not Ready for Production ***") + return setGlobalsFromContext(ctx) +} + // mainAdmin is the handle for "mc admin" command. func mainAdmin(ctx *cli.Context) error { cli.ShowCommandHelp(ctx, ctx.Args().First())