Skip to content

Commit

Permalink
Don't check Mix.env on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
axelson committed May 5, 2024
1 parent ffabe49 commit 368cbcc
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions lib/exsync/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@ require Logger

defmodule ExSync.Application do
def start(_, _) do
case Mix.env() do
:dev ->
start_supervisor()

_ ->
Logger.error("ExSync NOT started. Only `:dev` environment is supported.")
{:ok, self()}
end
end

def start() do
Application.ensure_all_started(:exsync)
end

def start_supervisor do
children =
[
maybe_include_src_monitor(),
Expand All @@ -34,6 +19,10 @@ defmodule ExSync.Application do
Supervisor.start_link(children, opts)
end

def start() do
Application.ensure_all_started(:exsync)
end

def maybe_include_src_monitor do
if ExSync.Config.src_monitor_enabled() do
[ExSync.SrcMonitor]
Expand Down

0 comments on commit 368cbcc

Please sign in to comment.