From aa0c6fd9ecc16144ce7c7316740d0b2bd6514fe7 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Fri, 31 May 2024 23:50:29 -0400 Subject: [PATCH] fix: handle existing deps when they are not local properly --- lib/install.ex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/install.ex b/lib/install.ex index 0b89dff..037b39c 100644 --- a/lib/install.ex +++ b/lib/install.ex @@ -28,7 +28,7 @@ defmodule Igniter.Install do igniter = Enum.reduce(install_list, igniter, fn install, igniter -> - if Mix.Project.config()[:deps][install][:path] do + if local_dep?(install) do Mix.shell().info( "Not looking up dependency for #{install}, because a local dependency is detected" ) @@ -161,4 +161,9 @@ defmodule Igniter.Install do |> String.split(",") |> Enum.map(&String.to_atom/1) end + + defp local_dep?(install) do + config = Mix.Project.config()[:deps][install] + Keyword.keyword?(config) && config[:path] + end end