Skip to content

Commit 86d5d08

Browse files
committed
Improve error message when app isn't found
It looks like this now: ``` ** (Shoehorn.ReleaseError) :nerves_runtime is not a known OTP application If ':nerves_runtime' looks right (no typos, etc.) then check that it exists in your project's `mix.exs`'s dependency list. If it exists and has a `:targets` option, make sure the current target, 'rpi', is in the list. ```
1 parent 07c52f7 commit 86d5d08

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/shoehorn/release.ex

+9-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,15 @@ defmodule Shoehorn.Release do
179179
end
180180

181181
defp check_app(app, applications) when is_atom(app) do
182-
applications[app] != nil or raise ReleaseError, "#{app} is not a known OTP application"
182+
applications[app] != nil or
183+
raise ReleaseError, """
184+
#{inspect(app)} is not a known OTP application
185+
186+
If '#{inspect(app)}' looks right (no typos, etc.) then check that it exists
187+
in your project's `mix.exs`'s dependency list. If it exists and has a
188+
`:targets` option, make sure the current target, '#{Mix.target()}', is in
189+
the list.
190+
"""
183191
end
184192

185193
defp check_app({_, _, _} = mfa, _applications) do

0 commit comments

Comments
 (0)