You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix is so simple that I don't want to make a MR for it. Just add the data up to EOF when reading stdin. That is in cli/flags.go in function readStdin():
// readStdin reads from stdin and returns the input as a string or an error
func readStdin() (string, error) {
reader := bufio.NewReader(os.Stdin)
var input string
for {
line, err := reader.ReadString('\n')
+ input += line
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return "", fmt.Errorf("error reading from stdin: %w", err)
}
- input += line
}
return input, nil
}
Since I'm just a Go beginner, I'm not sure, if line must be checked before using it.
This change fixes the described problem and also #917.
What happened?
A line without a trailing newline will be ignored:
No user input is sent:
With a trailing newline it works:
User input is sent:
Version check
Relevant log output
No response
Relevant screenshots (optional)
No response
The text was updated successfully, but these errors were encountered: