From 538bc51d68b27e7343028c8da61f3d31de26f3b5 Mon Sep 17 00:00:00 2001 From: Jay Wallace Date: Fri, 27 Jul 2018 16:51:38 -0700 Subject: [PATCH] remove unnecessary logic --- cmd/draft/up.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/draft/up.go b/cmd/draft/up.go index a8e6ad1..a54b111 100644 --- a/cmd/draft/up.go +++ b/cmd/draft/up.go @@ -170,14 +170,15 @@ func (u *upCmd) run(environment string) (err error) { buildctx.Env.ContainerBuilder = configuredBuilder } + // if a registry has been set in their global config but nothing was in draft.toml, use that instead. + if reg, ok := globalConfig[registry.name]; ok { + buildctx.Env.Registry = reg + } + // Check if skip-image-push is specified. If so, unset registry. if skipImagePush { buildctx.Env.Registry = "" } - // if a registry has been set in their global config but nothing was in draft.toml, use that instead. - if reg, ok := globalConfig[registry.name]; ok && !skipImagePush { - buildctx.Env.Registry = reg - } if configuredResourceGroup, ok := globalConfig[resourceGroupName.name]; ok { buildctx.Env.ResourceGroupName = configuredResourceGroup