Skip to content

Commit

Permalink
Ensure loadpaths are setup
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Oct 9, 2023
1 parent 1d4b684 commit bffe098
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mix/tasks/esbuild.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule Mix.Tasks.Esbuild do
if opts[:runtime_config] do
Mix.Task.run("app.config")
else
Application.ensure_all_started(:esbuild)
Mix.Task.run("loadpaths")
end

Mix.Task.reenable("esbuild")
Expand Down
6 changes: 5 additions & 1 deletion lib/mix/tasks/esbuild.install.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ defmodule Mix.Tasks.Esbuild.Install do

case OptionParser.parse_head!(args, strict: valid_options) do
{opts, []} ->
if opts[:runtime_config], do: Mix.Task.run("app.config")
if opts[:runtime_config] do
Mix.Task.run("app.config")
else
Mix.Task.run("loadpaths")
end

if opts[:if_missing] && latest_version?() do
:ok
Expand Down

0 comments on commit bffe098

Please sign in to comment.