vendor: add mattn/go-shellwords

This commit is contained in:
Casey Callendrello
2017-05-31 19:20:27 +02:00
parent b47d5b7c0a
commit 22cda76afb
7 changed files with 262 additions and 0 deletions

17
vendor/github.com/mattn/go-shellwords/util_windows.go generated vendored Normal file
View File

@ -0,0 +1,17 @@
package shellwords
import (
"errors"
"os"
"os/exec"
"strings"
)
func shellRun(line string) (string, error) {
shell := os.Getenv("COMSPEC")
b, err := exec.Command(shell, "/c", line).Output()
if err != nil {
return "", errors.New(err.Error() + ":" + string(b))
}
return strings.TrimSpace(string(b)), nil
}