Skip to content

Commit de6e9c4

Browse files
authored
Merge pull request #1216 from soupglasses/fix/issue-1197
fix: remove assumption to fix deterministic builds
2 parents 6d9e8e6 + 8f03870 commit de6e9c4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/language_server/lib/language_server.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ defmodule ElixirLS.LanguageServer do
143143
enum_ex_path = Enum.module_info()[:compile][:source]
144144

145145
elixir_sources_available =
146-
unless File.exists?(enum_ex_path, [:raw]) do
147-
dir = Path.join(enum_ex_path, "../../../..") |> Path.expand()
146+
# handle possible nil from deterministic build of elixir
147+
unless enum_ex_path && File.exists?(enum_ex_path, [:raw]) do
148+
dir = (enum_ex_path || ~c"/") |> Path.join("../../../..") |> Path.expand()
148149

149150
Logger.notice(
150151
"Elixir sources not found (checking in #{dir}). Code navigation to Elixir modules disabled."

0 commit comments

Comments
 (0)