Skip to content

Commit

Permalink
fix: narrow os.file to FdReader in AppFmt
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Jul 5, 2022
1 parent 29f241e commit 4b91c39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,14 @@ func channelStatusString(useColor bool, status datatransfer.Status) string {

type AppFmt struct {
app *cli.App
Stdin *os.File
Stdin gopass.FdReader
}

func NewAppFmt(a *cli.App) *AppFmt {
var stdin *os.File
var stdin gopass.FdReader
istdin, ok := a.Metadata["stdin"]
if ok {
stdin = istdin.(*os.File)
stdin = istdin.(gopass.FdReader)
} else {
stdin = os.Stdin
}
Expand Down

0 comments on commit 4b91c39

Please sign in to comment.