Skip to content

Commit

Permalink
Reorder startup sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Apr 14, 2023
1 parent 910f7b1 commit 85cfc56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
### Unreleased

### v0.14.1: 14 April 2023

#### Fixes

- Reorder startup sequence to avert mix crash

### v0.14.0: 14 April 2023

#### Improvements
Expand Down
10 changes: 5 additions & 5 deletions apps/elixir_ls_utils/lib/launch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ defmodule ElixirLS.Utils.Launch do
@compiled_otp_version System.otp_release()

def start_mix do
# reset env and target if it is set
Mix.env(:dev)
Mix.target(:host)
System.put_env([{"MIX_ENV", nil}, {"MIX_TARGET", nil}])

Mix.start()
Mix.Local.append_archives()
Mix.Local.append_paths()
Expand All @@ -18,6 +13,11 @@ defmodule ElixirLS.Utils.Launch do
Hex.start()
end

# reset env and target if it is set
Mix.env(:dev)
Mix.target(:host)
System.put_env([{"MIX_ENV", nil}, {"MIX_TARGET", nil}])

load_dot_config()

# as of 1.14 mix supports two environment variables MIX_QUIET and MIX_DEBUG
Expand Down

0 comments on commit 85cfc56

Please sign in to comment.