Skip to content

attach --exec opens up the interactive console and does not log the result #25224

Closed
@SomeGuyCalledBru

Description

System information

Geth version: Geth Version: 1.10.20-stable Architecture: amd64 Go Version: go1.18.3 Operating System: linux GOPATH= GOROOT=go
OS & Version: Ubuntu 20.04 LTS
Commit hash : -

Latest geth seems to have broken attach behavior - the --exec flag does nothing.

Expected behaviour

--exec prints out result and quits

Actual behaviour

--exec prints out nothing and opens up the interactive console.

Steps to reproduce the behaviour

Run any command with attach using --exec on v1.10.20

Backtrace

root@Ubuntu-2004-user ~/eth-node # ./geth_ethereum attach /root/eth-node/datadir/geth.ipc --exec "admin.nodeInfo"
Welcome to the Geth JavaScript console!

instance: Geth/v1.10.20-stable/linux-amd64/go1.18.3
at block: 15057827 (Fri Jul 01 2022 19:05:44 GMT+0200 (CEST))
datadir: /root/eth-node/datadir
modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

To exit, press ctrl-d or type exit
>

image
Also seems to be reproduced by discord user schone#2266.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions