From 5625a978333a5b7f8bd3dc03948d9e21dbc4c250 Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Tue, 27 Dec 2016 15:59:07 +0530 Subject: [PATCH] Flag validation called on up and down On kompose up and kompose down flag validation was done which is validating flags that are not there in kompose up and kompose down --- cmd/convert.go | 3 ++- cmd/down.go | 3 --- cmd/up.go | 3 --- cmd/version.go | 1 + 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cmd/convert.go b/cmd/convert.go index 87b24d01..8b1c5181 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -17,11 +17,12 @@ limitations under the License. package cmd import ( + "strings" + "github.com/kubernetes-incubator/kompose/pkg/app" "github.com/kubernetes-incubator/kompose/pkg/kobject" "github.com/spf13/cobra" "github.com/spf13/viper" - "strings" ) var ( diff --git a/cmd/down.go b/cmd/down.go index 9881c1bc..fb688ce7 100644 --- a/cmd/down.go +++ b/cmd/down.go @@ -43,9 +43,6 @@ var downCmd = &cobra.Command{ Provider: strings.ToLower(GlobalProvider), EmptyVols: DownEmptyVols, } - - // Validate before doing anything else. Use "bundle" if passed in. - app.ValidateFlags(GlobalBundle, args, cmd, &DownOpt) }, Run: func(cmd *cobra.Command, args []string) { app.Down(DownOpt) diff --git a/cmd/up.go b/cmd/up.go index 75434a42..5b61de8c 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -43,9 +43,6 @@ var upCmd = &cobra.Command{ Provider: strings.ToLower(GlobalProvider), EmptyVols: UpEmptyVols, } - - // Validate before doing anything else. Use "bundle" if passed in. - app.ValidateFlags(GlobalBundle, args, cmd, &UpOpt) }, Run: func(cmd *cobra.Command, args []string) { app.Up(UpOpt) diff --git a/cmd/version.go b/cmd/version.go index 73e65c0c..71c7f5cd 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -18,6 +18,7 @@ package cmd import ( "fmt" + "github.com/spf13/cobra" )