From dfc79632b832e70078ccbc9f30e19e3aa3a022ee Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Wed, 3 Aug 2016 11:42:07 -0700 Subject: [PATCH] Enable warnings in stdout --- cli/app/app.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cli/app/app.go b/cli/app/app.go index fde789dc..48ea9b32 100644 --- a/cli/app/app.go +++ b/cli/app/app.go @@ -747,9 +747,7 @@ func loadBundlesFile(file string, opt convertOptions) KomposeObject { } for name, service := range bundle.Services { - if !opt.toStdout { - checkUnsupportedKey(service) - } + checkUnsupportedKey(service) serviceConfig := ServiceConfig{} serviceConfig.Command = service.Command serviceConfig.Args = service.Args @@ -823,9 +821,7 @@ func loadComposeFile(file string, opt convertOptions) KomposeObject { composeServiceNames := composeObject.ServiceConfigs.Keys() for _, name := range composeServiceNames { if composeServiceConfig, ok := composeObject.ServiceConfigs.Get(name); ok { - if !opt.toStdout { - checkUnsupportedKey(composeServiceConfig) - } + checkUnsupportedKey(composeServiceConfig) serviceConfig := ServiceConfig{} serviceConfig.Image = composeServiceConfig.Image serviceConfig.ContainerName = composeServiceConfig.ContainerName @@ -989,7 +985,7 @@ func komposeConvert(komposeObject KomposeObject, opt convertOptions) { var datasvc []byte // If ports not provided in configuration we will not make service - if len(ports) == 0 && !opt.toStdout { + if len(ports) == 0 { logrus.Warningf("[%s] Service cannot be created because of missing port.", name) } else if len(ports) != 0 { // convert datasvc to json / yaml