Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geth account import flags no longer work #25209

Closed
prestonvanloon opened this issue Jun 30, 2022 · 4 comments · Fixed by #25234
Closed

geth account import flags no longer work #25209

prestonvanloon opened this issue Jun 30, 2022 · 4 comments · Fixed by #25234

Comments

@prestonvanloon
Copy link
Contributor

System information

Geth version: version 1.10.20 @ commit 8f2416a
OS & Version: linux
Commit hash : 8f2416a

Expected behaviour

It works

Actual behaviour

Fatal: keyfile must be given as the only argument
exit status 1

Steps to reproduce the behaviour

go run ./cmd/geth account import /tmp/key --datadir=/tmp/eth --keystore=/tmp/keystore --password=/tmp/pass

Backtrace

Fatal: keyfile must be given as the only argument
exit status 1

When submitting logs: please submit them as text and not screenshots.

@prestonvanloon
Copy link
Contributor Author

Probably caused by #24751

@prestonvanloon
Copy link
Contributor Author

I see in the release notes that the flags must be before the arguments.

Geth and most other command-line tools now use a newer version of the command-line argument/flag handling library. There is one new restriction with this change: flags must now be given before other arguments. Very few of Geth's subcommands take arguments, so this is unlikely to cause issues.

I found this as a surprise when updating the "stable" image of geth. I would like to request that the prior functionality be restored such that the flags can appear in any order as many program commands allow or prefer the flags after the arguments.

@fjl
Copy link
Contributor

fjl commented Jul 1, 2022

We cannot restore the previous behavior, unfortunately. It's a limitation of the cli library.

@fjl fjl removed the type:bug label Jul 1, 2022
@prestonvanloon
Copy link
Contributor Author

Thanks @fjl! I found this related issue as well urfave/cli#1391.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants