cmd/gomobile: always display stdout from abd
Fixes golang/go#12418 Change-Id: Ie0f2e669b3e516787b548c69a624e9063cd7f68f Reviewed-on: https://go-review.googlesource.com/14160 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
fee22db634
commit
471eeebd99
|
@ -6,8 +6,10 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var cmdInstall = &command{
|
||||
|
@ -34,10 +36,21 @@ func runInstall(cmd *command) error {
|
|||
if err := runBuild(cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
return runCmd(exec.Command(
|
||||
|
||||
// Don't use runCmd as adb does not return a useful exit code.
|
||||
c := exec.Command(
|
||||
`adb`,
|
||||
`install`,
|
||||
`-r`,
|
||||
filepath.Base(pkg.Dir)+`.apk`,
|
||||
))
|
||||
)
|
||||
c.Stdout = os.Stdout
|
||||
c.Stderr = os.Stderr
|
||||
if buildX || buildN {
|
||||
printcmd("%s", strings.Join(c.Args, " "))
|
||||
}
|
||||
if buildN {
|
||||
return nil
|
||||
}
|
||||
return c.Run()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue