From a30dd1b6f35541a1ae32df67e7bdd38d0535aab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Szczekutowicz?= Date: Mon, 18 Dec 2017 21:20:53 +0100 Subject: [PATCH] Return errors from client in stack deploy configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Szczekutowicz --- cli/command/stack/deploy_composefile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/stack/deploy_composefile.go b/cli/command/stack/deploy_composefile.go index 144faccede..83189b3d82 100644 --- a/cli/command/stack/deploy_composefile.go +++ b/cli/command/stack/deploy_composefile.go @@ -248,13 +248,13 @@ func createConfigs( case err == nil: // config already exists, then we update that if err := client.ConfigUpdate(ctx, config.ID, config.Meta.Version, configSpec); err != nil { - errors.Wrapf(err, "failed to update config %s", configSpec.Name) + return errors.Wrapf(err, "failed to update config %s", configSpec.Name) } case apiclient.IsErrNotFound(err): // config does not exist, then we create a new one. fmt.Fprintf(dockerCli.Out(), "Creating config %s\n", configSpec.Name) if _, err := client.ConfigCreate(ctx, configSpec); err != nil { - errors.Wrapf(err, "failed to create config %s", configSpec.Name) + return errors.Wrapf(err, "failed to create config %s", configSpec.Name) } default: return err