File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,15 @@ defmodule Mix.Dep do
7171 against the lock.
7272 """
7373 def cached do
74- if project = Mix.Project . get do
75- key = { :cached_deps , project }
76- Mix.ProjectStack . read_cache ( key ) ||
77- Mix.ProjectStack . write_cache ( key , loaded ( env: Mix . env ) )
78- else
79- loaded ( env: Mix . env )
74+ cond do
75+ System . get_env ( "MIX_NO_DEPS" ) in ~w( 1 true) ->
76+ [ ]
77+ project = Mix.Project . get ->
78+ key = { :cached_deps , project }
79+ Mix.ProjectStack . read_cache ( key ) ||
80+ Mix.ProjectStack . write_cache ( key , loaded ( env: Mix . env ) )
81+ true ->
82+ loaded ( env: Mix . env )
8083 end
8184 end
8285
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ defmodule Mix.Tasks.Deps.Loadpaths do
3333 path
3434 end
3535
36- prune_deps ( load_paths , "--no-deps-check" in args )
36+ prune_deps ( load_paths , "--no-deps-check" in args or System . get_env ( "MIX_NO_DEPS" ) in ~w ( 1 true ) )
3737 end
3838
3939 # If the build is per environment, we should be able to look
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ defmodule Mix.Tasks.Loadpaths do
3232
3333 # --no-deps is used only internally. It has no purpose
3434 # from Mix.CLI because running a task may load deps.
35- unless "--no-deps" in args or System . get_env ( "MIX_NO_DEPS" ) in ~w ( 1 true ) do
35+ unless "--no-deps" in args do
3636 Mix.Task . run "deps.loadpaths" , args
3737 end
3838
You can’t perform that action at this time.
0 commit comments