From 13c679730d3cf5d28b238b6dbcf7f37f12de4b14 Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Fri, 11 Aug 2023 14:30:38 -0400 Subject: [PATCH] chore: don't install burrito in test (#167) --- lib/next_ls/lsp_supervisor.ex | 4 +++- mix.exs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/next_ls/lsp_supervisor.ex b/lib/next_ls/lsp_supervisor.ex index 43b1b1f0..d15b64a2 100644 --- a/lib/next_ls/lsp_supervisor.ex +++ b/lib/next_ls/lsp_supervisor.ex @@ -33,7 +33,9 @@ defmodule NextLS.LSPSupervisor do if @env == :test do :ignore else - argv = if @env == :prod, do: Burrito.Util.Args.get_arguments(), else: System.argv() + {m, f, a} = if @env == :prod, do: {Burrito.Util.Args, :get_arguments, []}, else: {System, :argv, []} + + argv = apply(m, f, a) {opts, _, invalid} = OptionParser.parse(argv, strict: [stdio: :boolean, port: :integer]) diff --git a/mix.exs b/mix.exs index 56ebc3e8..05776f90 100644 --- a/mix.exs +++ b/mix.exs @@ -60,7 +60,7 @@ defmodule NextLS.MixProject do {:exqlite, "~> 0.13.14"}, {:styler, "~> 0.8", only: :dev}, {:ex_doc, ">= 0.0.0", only: :dev}, - {:burrito, github: "burrito-elixir/burrito"}, + {:burrito, github: "burrito-elixir/burrito", only: [:dev, :prod]}, {:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false} ] end