From 708c72d0db42096806bf7d2bdc147e6a1ffc0f19 Mon Sep 17 00:00:00 2001
From: DCCooper <1866858@gmail.com>
Date: Sat, 19 Sep 2020 10:29:56 +0800
Subject: [PATCH] isula-build: add -t shortname for --tag and remove it from
 --timeout

Signed-off-by: DCCooper <1866858@gmail.com>
---
 cmd/cli/build.go | 2 +-
 cmd/cli/main.go  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/cli/build.go b/cmd/cli/build.go
index 5c94bedd..a0245b1d 100644
--- a/cmd/cli/build.go
+++ b/cmd/cli/build.go
@@ -114,7 +114,7 @@ func NewBuildCmd() *cobra.Command {
 	buildCmd.PersistentFlags().StringArrayVar(&buildOpts.buildArgs, "build-arg", []string{}, "Arguments used during build time")
 	buildCmd.PersistentFlags().StringArrayVar(&buildOpts.capAddList, "cap-add", []string{}, "Add Linux capabilities for RUN command")
 	buildCmd.PersistentFlags().StringVar(&buildOpts.imageIDFile, "iidfile", "", "Write image ID to the file")
-	buildCmd.PersistentFlags().StringVarP(&buildOpts.additionalTag, "tag", "", "", "Add tag to the built image")
+	buildCmd.PersistentFlags().StringVarP(&buildOpts.additionalTag, "tag", "t", "", "Add tag to the built image")
 
 	return buildCmd
 }
diff --git a/cmd/cli/main.go b/cmd/cli/main.go
index 18bbb965..47206e72 100644
--- a/cmd/cli/main.go
+++ b/cmd/cli/main.go
@@ -95,7 +95,7 @@ func setupRootCmd(rootCmd *cobra.Command) {
 	rootCmd.SetFlagErrorFunc(util.FlagErrorFunc)
 	rootCmd.PersistentFlags().StringVar(&cliOpts.LogLevel, "log-level", "error", "Log level to be used. Either \"debug\", \"info\", \"warn\" or \"error\"")
 	rootCmd.PersistentFlags().BoolVarP(&cliOpts.Debug, "debug", "D", false, "Open debug mode")
-	rootCmd.PersistentFlags().StringVarP(&cliOpts.Timeout, "timeout", "t", "", "Timeout for connecting to daemon")
+	rootCmd.PersistentFlags().StringVar(&cliOpts.Timeout, "timeout", "", "Timeout for connecting to daemon")
 	rootCmd.PersistentFlags().BoolP("help", "h", false, "Print usage")
 	rootCmd.PersistentFlags().BoolP("version", "v", false, "Version for isula-build client")
 }
-- 
2.19.1

