fix: vendor oban_web — never pull oban_pro from live repo
Remove conditional oban_repo_configured?() check that would pull oban_pro from repo.oban.pro when hex config contained credentials. The root mix.exs already provides oban_pro via vendored path.
This commit is contained in:
parent
e6fba0c5a3
commit
ed3c251142
1 changed files with 3 additions and 17 deletions
20
vendor/oban_web/mix.exs
vendored
20
vendor/oban_web/mix.exs
vendored
|
|
@ -129,23 +129,9 @@ defmodule Oban.Web.MixProject do
|
|||
end
|
||||
|
||||
defp oban_pro_dep do
|
||||
if oban_repo_configured?() do
|
||||
[{:oban_pro, "~> 1.7.0", repo: :oban, only: [:test, :dev]}]
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
defp oban_repo_configured? do
|
||||
hex_config = Path.expand("~/.hex/hex.config")
|
||||
|
||||
case File.read(hex_config) do
|
||||
{:ok, content} ->
|
||||
String.contains?(content, "repo.oban.pro")
|
||||
|
||||
{:error, _} ->
|
||||
false
|
||||
end
|
||||
# Always use the vendored oban_pro provided by the root mix.exs.
|
||||
# Never pull from the live oban repo regardless of hex config.
|
||||
[]
|
||||
end
|
||||
|
||||
defp aliases do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue