Skip to content

Commit

Permalink
Fix Credo issues in Client and DefaultClient
Browse files Browse the repository at this point in the history
  • Loading branch information
lawik authored and fhunleth committed Dec 22, 2024
1 parent f50ba52 commit 472deba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/nerves_hub_link/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ defmodule NervesHubLink.Client do
@doc """
This function is called internally by NervesHubLink to identify a device.
"""
@spec identify() :: :ok
def identify() do
apply_wrap(mod(), :identify, [])
end
Expand Down
5 changes: 4 additions & 1 deletion lib/nerves_hub_link/client/default.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ defmodule NervesHubLink.Client.Default do
"""

@behaviour NervesHubLink.Client

alias Nerves.Runtime.KV

require Logger

@impl NervesHubLink.Client
def update_available(update_info) do
if update_info.firmware_meta.uuid == Nerves.Runtime.KV.get_active("nerves_fw_uuid") do
if update_info.firmware_meta.uuid == KV.get_active("nerves_fw_uuid") do
Logger.info("""
[NervesHubLink.Client] Ignoring request to update to the same firmware
Expand Down

0 comments on commit 472deba

Please sign in to comment.