Browse code

Send warnings to stderr.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Daniel Nephin authored on 2016/11/03 01:19:37
Showing 1 changed files
... ...
@@ -73,13 +73,13 @@ func runDeploy(dockerCli *command.DockerCli, opts deployOptions) error {
73 73
 
74 74
 	unsupportedProperties := loader.GetUnsupportedProperties(configDetails)
75 75
 	if len(unsupportedProperties) > 0 {
76
-		fmt.Printf("Ignoring unsupported options: %s\n\n",
76
+		fmt.Fprintf(dockerCli.Err(), "Ignoring unsupported options: %s\n\n",
77 77
 			strings.Join(unsupportedProperties, ", "))
78 78
 	}
79 79
 
80 80
 	deprecatedProperties := loader.GetDeprecatedProperties(configDetails)
81 81
 	if len(deprecatedProperties) > 0 {
82
-		fmt.Printf("Ignoring deprecated options:\n\n%s\n\n",
82
+		fmt.Fprintf(dockerCli.Err(), "Ignoring deprecated options:\n\n%s\n\n",
83 83
 			propertyWarnings(deprecatedProperties))
84 84
 	}
85 85
 
... ...
@@ -434,11 +434,10 @@ func convertRestartPolicy(restart string, source *composetypes.RestartPolicy) (*
434 434
 			}, nil
435 435
 		}
436 436
 	}
437
-	attempts := uint64(*source.MaxAttempts)
438 437
 	return &swarm.RestartPolicy{
439 438
 		Condition:   swarm.RestartPolicyCondition(source.Condition),
440 439
 		Delay:       source.Delay,
441
-		MaxAttempts: &attempts,
440
+		MaxAttempts: source.MaxAttempts,
442 441
 		Window:      source.Window,
443 442
 	}, nil
444 443
 }