Skip to content

Commit

Permalink
fix: feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien Rigaud committed Sep 26, 2024
1 parent aa7f8b1 commit 5c9aca0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/cosmovisor/cmd/cosmovisor/show_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"

"cosmossdk.io/tools/cosmovisor"
"github.com/spf13/cobra"
)

Expand All @@ -19,6 +20,16 @@ func NewShowUpgradeInfoCmd() *cobra.Command {
}

func showUpgradeInfoCmd(cmd *cobra.Command) error {
configPath, err := cmd.Flags().GetString(cosmovisor.FlagCosmovisorConfig)
if err != nil {
return fmt.Errorf("failed to get config flag: %w", err)
}

cfg, err := cosmovisor.GetConfigFromFile(configPath)
if err != nil {
return err
}

data, err := os.ReadFile(cfg.UpgradeInfoFilePath())
if err != nil {
if os.IsNotExist(err) {
Expand Down

0 comments on commit 5c9aca0

Please sign in to comment.