Merge PR #2257: checked error on Fprintf

This commit is contained in:
Christopher Goes 2018-09-07 08:34:46 +02:00 committed by GitHub
commit 5e13b2b138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -224,9 +224,15 @@ func (kb dbKeybase) Sign(name, passphrase string, msg []byte) (sig []byte, pub t
}
case offlineInfo:
linfo := info.(offlineInfo)
fmt.Fprintf(os.Stderr, "Bytes to sign:\n%s", msg)
_, err := fmt.Fprintf(os.Stderr, "Bytes to sign:\n%s", msg)
if err != nil {
return nil, nil, err
}
buf := bufio.NewReader(os.Stdin)
fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n")
_, err = fmt.Fprintf(os.Stderr, "\nEnter Amino-encoded signature:\n")
if err != nil {
return nil, nil, err
}
// Will block until user inputs the signature
signed, err := buf.ReadString('\n')
if err != nil {