Skip to content

Commit

Permalink
fix: ensure epmd is started (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed Sep 18, 2023
1 parent fec818e commit 2edfe59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/next_ls/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ defmodule NextLS.Application do

@impl true
def start(_type, _args) do
case System.cmd("epmd", ["-daemon"], stderr_to_stdout: true) do
{_, 0} ->
:ok

{output, code} ->
IO.warn("Failed to start epmd! Exited with code=#{code} and output=#{output}")

raise "Failed to start epmd!"
end

Node.start(:"next-ls-#{System.system_time()}", :shortnames)

children = [NextLS.LSPSupervisor]
Expand Down

0 comments on commit 2edfe59

Please sign in to comment.