Skip to content

Commit

Permalink
remove unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
dlinsley committed Oct 4, 2024
1 parent a9cca78 commit 06e88ed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/commands/update_stemcell.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,17 @@ 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)
if err != nil {
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
Expand Down

0 comments on commit 06e88ed

Please sign in to comment.