refactor: consolidate ForkReader-like implementations to IOCommand

This commit is contained in:
Christian Schwarz
2017-05-14 12:27:15 +02:00
parent ee8b0d3781
commit ee570bb060
4 changed files with 115 additions and 121 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"bytes"
"errors"
"fmt"
"github.com/zrepl/zrepl/util"
"io"
"os/exec"
"strings"
@@ -114,7 +115,7 @@ func ZFSSend(fs DatasetPath, from, to *FilesystemVersion) (stream io.Reader, err
args = append(args, "-i", from.ToAbsPath(fs), to.ToAbsPath(fs))
}
stream, err = NewForkExecReader(ZFS_BINARY, args...)
stream, err = util.RunIOCommand(ZFS_BINARY, args...)
return
}