There was an error while loading. Please reload this page.
1 parent e8ef5ae commit 68b3369Copy full SHA for 68b3369
1 file changed
lib/elixir_script.ex
@@ -121,16 +121,24 @@ defmodule ElixirScript do
121
end
122
123
defp get_compiler_cache(path, opts) do
124
- if Map.get(opts, :full_build) or empty?(opts.output) or old_version?(opts) do
+ refresh_cache = cond do
125
+ Map.get(opts, :full_build) ->
126
+ true
127
+ empty?(opts.output) ->
128
129
+ old_version?(opts) ->
130
131
+ Cache.get(path) == nil ->
132
133
+ true ->
134
+ false
135
+ end
136
+
137
+ if refresh_cache do
138
Cache.delete(path)
139
Cache.new(get_stdlib_state)
140
else
- case Cache.get(path) do
- nil ->
- Cache.new(get_stdlib_state)
- x ->
- %{ x | full_build?: false }
- end
141
+ %{ Cache.get(path) | full_build?: false }
142
143
144
0 commit comments