From 06e88edd822d40784bec0e757952c998edcfa433 Mon Sep 17 00:00:00 2001 From: Daniel Linsley Date: Fri, 5 Jul 2024 16:39:45 +0000 Subject: [PATCH] remove unnecessary else --- internal/commands/update_stemcell.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/commands/update_stemcell.go b/internal/commands/update_stemcell.go index cdf49f50..3ae8eb27 100644 --- a/internal/commands/update_stemcell.go +++ b/internal/commands/update_stemcell.go @@ -91,6 +91,9 @@ func (update UpdateStemcell) Execute(args []string) error { } lock := &kilnfileLock.Releases[i] + lock.RemotePath = remote.RemotePath + lock.RemoteSource = remote.RemoteSource + lock.SHA1 = remote.SHA1 if remote.SHA1 == "" || remote.SHA1 == "not-calculated" { // release source needs to download. local, err := releaseSource.DownloadRelease(update.Options.ReleasesDir, remote) @@ -98,11 +101,7 @@ func (update UpdateStemcell) Execute(args []string) error { return fmt.Errorf("while downloading release %q, encountered error: %w", rel.Name, err) } lock.SHA1 = local.Lock.SHA1 - } else { - lock.SHA1 = remote.SHA1 } - lock.RemotePath = remote.RemotePath - lock.RemoteSource = remote.RemoteSource } kilnfileLock.Stemcell.Version = trimmedInputVersion