File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,14 @@ defmodule Mix.Tasks.App.Config do
57
57
end
58
58
59
59
defp check_configured ( ) do
60
- for app <- Mix.ProjectStack . config_apps ( ) , is_nil ( Application . spec ( app , :vsn ) ) do
60
+ for app <- Mix.ProjectStack . config_apps ( ) ,
61
+ # Application.spec is a quick check that doesn't involve
62
+ # a separate process, so we try that first.
63
+ is_nil ( Application . spec ( app , :vsn ) ) ,
64
+ # Then we fallback to checking the :code.lib_dir for apps
65
+ # with runtime: false, which is still reasonably fast as
66
+ # the code server also uses a ETS table
67
+ :code . lib_dir ( app ) == { :error , :bad_name } do
61
68
Mix . shell ( ) . error ( """
62
69
You have configured application #{ inspect ( app ) } in your configuration file,
63
70
but the application is not available.
You can’t perform that action at this time.
0 commit comments