From ae8f00182973637c07c7bc852ee9c401b2c9ba91 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 2 Nov 2016 12:19:37 -0400 Subject: [PATCH] Send warnings to stderr. Signed-off-by: Daniel Nephin --- command/stack/deploy.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/command/stack/deploy.go b/command/stack/deploy.go index 83d55324de..b92662c3c5 100644 --- a/command/stack/deploy.go +++ b/command/stack/deploy.go @@ -73,13 +73,13 @@ func runDeploy(dockerCli *command.DockerCli, opts deployOptions) error { unsupportedProperties := loader.GetUnsupportedProperties(configDetails) if len(unsupportedProperties) > 0 { - fmt.Printf("Ignoring unsupported options: %s\n\n", + fmt.Fprintf(dockerCli.Err(), "Ignoring unsupported options: %s\n\n", strings.Join(unsupportedProperties, ", ")) } deprecatedProperties := loader.GetDeprecatedProperties(configDetails) if len(deprecatedProperties) > 0 { - fmt.Printf("Ignoring deprecated options:\n\n%s\n\n", + fmt.Fprintf(dockerCli.Err(), "Ignoring deprecated options:\n\n%s\n\n", propertyWarnings(deprecatedProperties)) } @@ -434,11 +434,10 @@ func convertRestartPolicy(restart string, source *composetypes.RestartPolicy) (* }, nil } } - attempts := uint64(*source.MaxAttempts) return &swarm.RestartPolicy{ Condition: swarm.RestartPolicyCondition(source.Condition), Delay: source.Delay, - MaxAttempts: &attempts, + MaxAttempts: source.MaxAttempts, Window: source.Window, }, nil }