Skip to content

Commit

Permalink
fix: cherry pick just the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Jan 8, 2024
1 parent 026cdf7 commit 5669548
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions x/auth/client/cli/tx_multisign.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,27 +186,14 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) {
}
}

outputDoc, _ := cmd.Flags().GetString(flags.FlagOutputDocument)
if outputDoc == "" {
cmd.Printf("%s\n", json)
return
}

fp, err := os.OpenFile(outputDoc, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o644)
closeFunc, err := setOutputFile(cmd)
if err != nil {
return err
}

defer func() {
err2 := fp.Close()
if err == nil {
err = err2
}
}()

err = clientCtx.PrintBytes(json)

return
defer closeFunc()
cmd.Printf("%s\n", json)
return nil
}
}

Expand Down

0 comments on commit 5669548

Please sign in to comment.