Merge pull request #124 from jficz/fix_92
fix: Don't test for stdin when body non-empty
This commit is contained in:
2
main.go
2
main.go
@@ -103,7 +103,7 @@ var rootCmd = &cobra.Command{
|
|||||||
return errors.New("unknown delivery method")
|
return errors.New("unknown delivery method")
|
||||||
}
|
}
|
||||||
|
|
||||||
if hasStdin() {
|
if body == "" && hasStdin() {
|
||||||
b, err := io.ReadAll(os.Stdin)
|
b, err := io.ReadAll(os.Stdin)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user