mirror of
https://github.com/golang/go
synced 2024-11-11 19:51:37 -07:00
misc/ios: ignore stderr from iOS tools
On (at least) macOS 10.12, the `security cms` subcommand used by the iOS detection script will output an error to stderr. The command otherwise succeeds, but the extra line confuses a later parsing step. To fix it, use only stdout and ignore stderr from every command run by detect.go. For the new iOS builders. Change-Id: Iee426da7926d7f987ba1be061fa92ebb853ef53d Reviewed-on: https://go-review.googlesource.com/36059 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
3f45916433
commit
ade6bcf1d5
@ -33,7 +33,7 @@ func main() {
|
||||
fname := f.Name()
|
||||
defer os.Remove(fname)
|
||||
|
||||
out := combinedOutput(parseMobileProvision(mp))
|
||||
out := output(parseMobileProvision(mp))
|
||||
_, err = f.Write(out)
|
||||
check(err)
|
||||
check(f.Close())
|
||||
@ -111,12 +111,12 @@ func plistExtract(fname string, path string) ([]byte, error) {
|
||||
}
|
||||
|
||||
func getLines(cmd *exec.Cmd) [][]byte {
|
||||
out := combinedOutput(cmd)
|
||||
out := output(cmd)
|
||||
return bytes.Split(out, []byte("\n"))
|
||||
}
|
||||
|
||||
func combinedOutput(cmd *exec.Cmd) []byte {
|
||||
out, err := cmd.CombinedOutput()
|
||||
func output(cmd *exec.Cmd) []byte {
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
fmt.Println(strings.Join(cmd.Args, "\n"))
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
Loading…
Reference in New Issue
Block a user