[release/1.4.7] cmd: fix CLI package deprecation warnings

(cherry picked from commit 90e07b19ab)
This commit is contained in:
Péter Szilágyi
2016-06-10 11:23:00 +03:00
parent c89fa789b7
commit 63c5a46b82
8 changed files with 55 additions and 27 deletions

View File

@ -58,7 +58,10 @@ type testgeth struct {
func init() {
// Run the app if we're the child process for runGeth.
if os.Getenv("GETH_TEST_CHILD") != "" {
app.RunAndExitOnError()
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
os.Exit(0)
}
}