Skip to content

Commit

Permalink
Fix regression that prevents using fwup public keys
Browse files Browse the repository at this point in the history
Commit 3275db2 added an empty list pattern match that would
fail when a key was present. Fix issue by removing the match.
  • Loading branch information
oestrich authored and fhunleth committed Jun 24, 2024
1 parent c6f10af commit 8ceb474
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nerves_hub_link/update_manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ defmodule NervesHubLink.UpdateManager do
end

@spec start_fwup_stream(UpdateInfo.t(), [binary()], State.t()) :: State.t()
defp start_fwup_stream(%UpdateInfo{} = update_info, [] = fwup_public_keys, state) do
defp start_fwup_stream(%UpdateInfo{} = update_info, fwup_public_keys, state) do
pid = self()
fun = &report_download(pid, &1)
{:ok, download} = Downloader.start_download(update_info.firmware_url, fun)
Expand All @@ -249,7 +249,7 @@ defmodule NervesHubLink.UpdateManager do
end

@spec fwup_args(FwupConfig.t(), list(String.t())) :: [String.t()]
defp fwup_args(%FwupConfig{} = config, [] = fwup_public_keys) do
defp fwup_args(%FwupConfig{} = config, fwup_public_keys) do
args = ["--apply", "--no-unmount", "-d", config.fwup_devpath, "--task", config.fwup_task]

Enum.reduce(fwup_public_keys, args, fn public_key, args ->
Expand Down

0 comments on commit 8ceb474

Please sign in to comment.