Closed robinkrahl closed 3 years ago
Thanks for the review! I’ll fix the issues and update the PR later today.
I think I’ve addressed all issues.
Hi Robin, why do you think we should have a dedicated update
command? Conceptually I am fine with it (just as an alternative to --force-update
), but it seems unnecessary to require users to use it. Can you please share your thoughts?
Good point! The cache lookup logic became pretty convoluted so I decided to separate reading and writing the cache. (For example we have to make sure that the nitrokey::Manager
is dropped before calling nitrocli
.) But I‘m fine with including the update logic in the get command too. I’m not sure which way is more intuitive and useful.
Sounds good. I vote for integration.
"There is no cached slot data. Run the update command to initialize the cache."
If a computer can tell me precisely what to do most of the time I just want it to do it for me. It was definitely the case for me here.
I’ve removed the update
command.
Do we want separate man pages for extensions?
Awesome, thank you!
Do we want separate man pages for extensions?
It's definitely not a priority right now for me. I'd hope we could cover most of it with a some decent help text. I'd rather we think about tests first on the extension front.
Fantastic work, Robin! Merged into devel
.
This PR is an iteration of PR #144: Add cache extension. It introduces the
NITROCLI_RESOLVED_USB_PATH
environment variable to avoid having to duplicate the device selection logic, it moves theext.rs
module into a new extension support crate,nitrokey-ext
, and adds the nitrocli-otp-cache extension.