Skip to content

Commit f1205ab

Browse files
committed
Ensure inets and ssl are available even on runtime: false
References: - [Ensure inets and ssl are available even on runtime: false][0] - [Avoid warnings][1] [0]: phoenixframework/esbuild@942815d [1]: phoenixframework/esbuild@1c5e95c
1 parent f418b5b commit f1205ab

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/mix/tasks/sass.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ defmodule Mix.Tasks.Sass do
2525
"""
2626

2727
@shortdoc "Invokes sass with the profile and args"
28+
@compile {:no_warn_undefined, Mix}
2829

2930
use Mix.Task
3031

@@ -33,6 +34,11 @@ defmodule Mix.Tasks.Sass do
3334
switches = [runtime_config: :boolean]
3435
{opts, remaining_args} = OptionParser.parse_head!(args, switches: switches)
3536

37+
if function_exported?(Mix, :ensure_application!, 1) do
38+
Mix.ensure_application!(:inets)
39+
Mix.ensure_application!(:ssl)
40+
end
41+
3642
if opts[:runtime_config] do
3743
Mix.Task.run("app.config")
3844
else

lib/mix/tasks/sass.install.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ defmodule Mix.Tasks.Sass.Install do
2323
"""
2424

2525
@shortdoc "Installs dart-sass under _build"
26+
@compile {:no_warn_undefined, Mix}
27+
2628
use Mix.Task
2729

2830
@impl true
@@ -36,6 +38,11 @@ defmodule Mix.Tasks.Sass.Install do
3638
if opts[:if_missing] && latest_version?() do
3739
:ok
3840
else
41+
if function_exported?(Mix, :ensure_application!, 1) do
42+
Mix.ensure_application!(:inets)
43+
Mix.ensure_application!(:ssl)
44+
end
45+
3946
DartSass.install()
4047
end
4148

0 commit comments

Comments
 (0)