Skip to content

Commit

Permalink
Enable headless arb-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalodner committed Apr 13, 2022
1 parent a3ccc14 commit 8fa4519
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/arb-rpc-node/cmd/arb-cli/arb-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func completer(t prompt.Document) []prompt.Suggest {
}

func run(ctx context.Context) error {
if len(os.Args) != 3 {
if len(os.Args) < 3 {
fmt.Println("Expected: arb-cli rpcurl privkey")
}
arbUrl := os.Args[1]
Expand Down Expand Up @@ -409,6 +409,13 @@ func run(ctx context.Context) error {
fb: nil,
}

if len(os.Args) >= 3 {
if err := handleCommand(os.Args[3:]); err != nil {
return fmt.Errorf("error running command: %w", err)
}
return nil
}

p := prompt.New(
executor,
completer,
Expand Down

0 comments on commit 8fa4519

Please sign in to comment.