Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/hex/remote_converger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ defmodule Hex.RemoteConverger do
end

def converge(deps, lock) do
unless Code.ensure_loaded?(Hex.Mix) do
Hex.Stdlib.ensure_application!(:hex)
end

Registry.open()

# Check and refresh OAuth token before fetching packages
Expand Down
8 changes: 8 additions & 0 deletions lib/hex/stdlib.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ defmodule Hex.Stdlib do
apply(:public_key, :ssh_hostkey_fingerprint, [digset_type, key])
end
end

# Compilation prunes code paths for isolation, which may remove archive
# paths like Hex. Restore them so all Hex modules are available.
def ensure_application!(app) do
if function_exported?(Mix, :ensure_application!, 1) do
apply(Mix, :ensure_application!, [app])
end
end
end
Loading