Add confirm option to allow automated updates on nk3 devices #575
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an option to the
nk3 update
subcommand that allows the update to be automated.Changes
--confirm
to confirm udpate.Important
The automation is only allowed for updates of the firmware. Downgrades or other potential issues that require user interaction are NOT included in this option. I.e. the confirmation applies only to the functions
confirm_download
andconfirm_update
.Note
I noticed that the update function for the Nitrokey FIDO2 uses
-y
or--yes
for a similar flag. However, to stay within the naming convention of the class functions of thenk3
interface, I decided to name the flag--confirm
.Checklist
Make sure to run
make check
andmake fix
before creating a PR, otherwise the CI will fail.tested with Python3.9
signed commits
updated documentation (e.g. parameter description, inline doc, docs.nitrokey)
added labels
Test Environment and Execution
v1.6.0-test.20231218
v1.7.0
andv1.7.2
(tested with--version
option andwithout)