Skip to content

Commit

Permalink
Merge branch 'nk3-update-macos'
Browse files Browse the repository at this point in the history
* nk3-update-macos:
  nk3: Split update into two steps for macOS

Closes #148
  • Loading branch information
robin-nitrokey committed Jan 17, 2022
2 parents f1d2ff5 + 83f6733 commit 613e238
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pynitrokey/cli/nk3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ def update(ctx: Context, image: str, experimental: bool) -> None:
device.reboot(BootMode.BOOTROM)

local_print("")

if platform.system() == "Darwin":
# Currently there is an issue with device enumeration after reboot on macOS, see
# <https://github.com/Nitrokey/pynitrokey/issues/145>. To avoid this issue, we
# cancel the command now and ask the user to run it again.
local_print(
"Bootloader mode enabled. Please repeat this command to apply the update."
)
raise click.Abort()

with _await_bootloader(ctx) as bootloader:
_perform_update(bootloader, data)
elif isinstance(device, Nitrokey3Bootloader):
Expand Down

0 comments on commit 613e238

Please sign in to comment.