wealdtech / ethereal

Apache License 2.0
208 stars 41 forks source link

Passphrase not read from config file #44

Closed catwith1hat closed 1 year ago

catwith1hat commented 1 year ago

I am failing to make ethereal respect the passphrase setting in the configuration file. It does respect the debug: true statement however, which I infer from ethereal printing Loading configuration file ./test.json. Here is a minimal test case:

$ ethereal version
2.8.7
$ echo '{ "passphrase": "hello", "debug": true }' > test.json
$ ethereal account keys --address="0xblabla" --config=./test.json
Loaded configuration file ./test.json
--privatekey or both of --address and --passphrase are required

Could it be that cmd.Flags().Lookup("passphrase") in root.go fails, and the viper.BindPFlag statement never gets executed?

Thanks!

catwith1hat commented 1 year ago

Thank you for the fix!