Open mdc-webdb opened 1 month ago
The following command should work:
$ nitropy nk3 --path /dev/hidraw1 update
I understand that this can be very confusing. AFAIK this is a limitation of the CLI framework we use because the --path
option is defined for all Nitrokey 3 commands. I don’t know a way to make nitropy nk3 update --path /dev/hidraw1
work without manually duplicating the option for all commands. But at least we could update the error message with an example invocation that shows the correct call.
Here’s the upstream issue: https://github.com/pallets/click/issues/66. There is no intention to change the behavior. We could try to work around it as described here: https://stackoverflow.com/questions/32493912/is-it-possible-to-add-a-global-argument-for-all-subcommands-in-click-based-inter
Hi @robin-nitrokey, I think an better message with an example in the error message will be the best. Because here the code change will be very simple.
All call of nitropy nk3 update fails with:
This line is not very informative, because nitropy nk3 list
will show all, but the path option fails on the update command.
So the "path" will be the first option. But it will fails with: