mirror of
https://github.com/LBRYFoundation/lbcd.git
synced 2025-08-30 08:51:28 +00:00
Always return non-zero code from btcctl on error.
This commit is contained in:
parent
629168b7ae
commit
c55152ef7e
1 changed files with 4 additions and 4 deletions
|
@ -210,7 +210,6 @@ func usage(parser *flags.Parser) {
|
||||||
"\tgetrawmempool\n"+
|
"\tgetrawmempool\n"+
|
||||||
"\tgetrawtransaction <txhash> [verbose=0]\n"+
|
"\tgetrawtransaction <txhash> [verbose=0]\n"+
|
||||||
"\tstop\n")
|
"\tstop\n")
|
||||||
os.Exit(1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -224,7 +223,7 @@ func main() {
|
||||||
if e, ok := err.(*flags.Error); !ok || e.Type != flags.ErrHelp {
|
if e, ok := err.(*flags.Error); !ok || e.Type != flags.ErrHelp {
|
||||||
usage(parser)
|
usage(parser)
|
||||||
}
|
}
|
||||||
return
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if cfg.Help {
|
if cfg.Help {
|
||||||
usage(parser)
|
usage(parser)
|
||||||
|
@ -236,7 +235,7 @@ func main() {
|
||||||
if !exists {
|
if !exists {
|
||||||
fmt.Fprintf(os.Stderr, "Unrecognized command: %s\n", args[0])
|
fmt.Fprintf(os.Stderr, "Unrecognized command: %s\n", args[0])
|
||||||
usage(parser)
|
usage(parser)
|
||||||
return
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute the command.
|
// Execute the command.
|
||||||
|
@ -244,9 +243,10 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == ErrUsage {
|
if err == ErrUsage {
|
||||||
usage(parser)
|
usage(parser)
|
||||||
return
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue