mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-04-24 03:00:15 -04:00
Merge branch 'main' into add_dry_run
This commit is contained in:
@@ -57,7 +57,6 @@ func Init() (ret *Flags, err error) {
|
||||
// takes input from stdin if it exists, otherwise takes input from args (the last argument)
|
||||
if hasStdin {
|
||||
if message, err = readStdin(); err != nil {
|
||||
err = errors.New("error: could not read from stdin")
|
||||
return
|
||||
}
|
||||
} else if len(args) > 0 {
|
||||
|
||||
@@ -3,7 +3,6 @@ package cli
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -26,7 +25,7 @@ func TestInit(t *testing.T) {
|
||||
|
||||
func TestReadStdin(t *testing.T) {
|
||||
input := "test input"
|
||||
stdin := ioutil.NopCloser(strings.NewReader(input))
|
||||
stdin := io.NopCloser(strings.NewReader(input))
|
||||
// No need to cast stdin to *os.File, pass it as io.ReadCloser directly
|
||||
content, err := ReadStdin(stdin)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user