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
|
end
|
||||||
|
|
||||||
defp oban_pro_dep do
|
defp oban_pro_dep do
|
||||||
if oban_repo_configured?() do
|
# Always use the vendored oban_pro provided by the root mix.exs.
|
||||||
[{:oban_pro, "~> 1.7.0", repo: :oban, only: [:test, :dev]}]
|
# Never pull from the live oban repo regardless of hex config.
|
||||||
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
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp aliases do
|
defp aliases do
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue