Skip to content

Commit

Permalink
remove unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
dlinsley committed Aug 21, 2024
1 parent f6fbfdd commit 10df70e
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 @@ -92,18 +92,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 10df70e

Please sign in to comment.