updating github.com/mistifyio/go-zfs to v2.1.1+incompatible
This commit is contained in:
13
vendor/github.com/mistifyio/go-zfs/utils.go
generated
vendored
13
vendor/github.com/mistifyio/go-zfs/utils.go
generated
vendored
@@ -8,8 +8,6 @@ import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/pborman/uuid"
|
||||
)
|
||||
|
||||
type command struct {
|
||||
@@ -36,17 +34,16 @@ func (c *command) Run(arg ...string) ([][]string, error) {
|
||||
}
|
||||
cmd.Stderr = &stderr
|
||||
|
||||
id := uuid.New()
|
||||
joinedArgs := strings.Join(cmd.Args, " ")
|
||||
|
||||
logger.Log([]string{"ID:" + id, "START", joinedArgs})
|
||||
debug := strings.Join([]string{cmd.Path, strings.Join(cmd.Args, " ")}, " ")
|
||||
if logger != nil {
|
||||
logger.Log(cmd.Args)
|
||||
}
|
||||
err := cmd.Run()
|
||||
logger.Log([]string{"ID:" + id, "FINISH"})
|
||||
|
||||
if err != nil {
|
||||
return nil, &Error{
|
||||
Err: err,
|
||||
Debug: strings.Join([]string{cmd.Path, joinedArgs}, " "),
|
||||
Debug: debug,
|
||||
Stderr: stderr.String(),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user