mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
cmd/XDC: fix some cli parsing issues (#25234)
This commit is contained in:
parent
369d69649f
commit
3e1ea87ca2
2 changed files with 8 additions and 1 deletions
|
|
@ -111,7 +111,10 @@ func localConsole(ctx *cli.Context) error {
|
|||
// remoteConsole will connect to a remote XDC instance, attaching a JavaScript
|
||||
// console to it.
|
||||
func remoteConsole(ctx *cli.Context) error {
|
||||
// Attach to a remotely running XDC instance and start the JavaScript console
|
||||
if ctx.Args().Len() > 1 {
|
||||
utils.Fatalf("invalid command-line: too many arguments")
|
||||
}
|
||||
|
||||
endpoint := ctx.Args().First()
|
||||
if endpoint == "" {
|
||||
path := node.DefaultDataDir()
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ func MigrateGlobalFlags(ctx *cli.Context) {
|
|||
|
||||
// This iterates over all commands and wraps their action function.
|
||||
iterate(ctx.App.Commands, func(cmd *cli.Command) {
|
||||
if cmd.Action == nil {
|
||||
return
|
||||
}
|
||||
|
||||
action := cmd.Action
|
||||
cmd.Action = func(ctx *cli.Context) error {
|
||||
doMigrateFlags(ctx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue