diff --git a/lib/excoveralls/settings.ex b/lib/excoveralls/settings.ex index b6ce37a6..a7243e3e 100644 --- a/lib/excoveralls/settings.ex +++ b/lib/excoveralls/settings.ex @@ -6,7 +6,10 @@ defmodule ExCoveralls.Settings do defmodule Files do @file_name "coveralls.json" def default_file, do: "#{Path.dirname(__ENV__.file)}/../conf/#{@file_name}" - def custom_file, do: "#{System.cwd}/#{@file_name}" + def custom_file do + dot_file = Path.expand("~/.excoveralls/coveralls.json") + if File.exists?(dot_file), do: dot_file, else: "#{System.cwd}/#{@file_name}" + end end @doc """