fix(tools/cosmovisor): fix wrong dir prepare-upgrade when non archive (#23652)

This commit is contained in:
Julien Robert 2025-02-11 16:45:29 +01:00 committed by GitHub
parent d7f101e6aa
commit bb03cd1c15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -36,6 +36,12 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
## v1.7.1 - 2025-01-12
### Bug Fixes
* [#23652](https://github.com/cosmos/cosmos-sdk/pull/23652) Fix issue with wrong directory placement when using `prepare-upgrade` for non archive.
## v1.7.0 - 2024-11-18
### Features

View File

@ -4,7 +4,6 @@ import (
"context"
"crypto/tls"
"fmt"
"path/filepath"
"strings"
"time"
@ -73,8 +72,7 @@ func prepareUpgradeHandler(cmd *cobra.Command, _ []string) error {
logger.Info("Downloading upgrade binary", "url", binaryURL)
upgradeBin := filepath.Join(cfg.UpgradeBin(upgradeInfo.Name), cfg.Name)
if err := plan.DownloadUpgrade(filepath.Dir(upgradeBin), binaryURL, cfg.Name); err != nil {
if err := plan.DownloadUpgrade(cfg.UpgradeDir(upgradeInfo.Name), binaryURL, cfg.Name); err != nil {
return fmt.Errorf("failed to download and verify binary: %w", err)
}