Skip to content

Commit

Permalink
Add application module
Browse files Browse the repository at this point in the history
  • Loading branch information
qgadrian committed Jul 15, 2019
1 parent ac13f5b commit 6f683b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions lib/application.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
defmodule GitHooks.Application do
@moduledoc false

use Application

alias GitHooks.Printer

def start(_, _) do
Printer.warn("""
`git_hooks` application should not be run as application, please add the
`runtime: false` options to your `mix.exs` file.
""")

{:ok, self()}
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ defmodule GitHooks.MixProject do
version: @version,
elixir: "~> 1.6",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
package: package(),
description: description(),
docs: [
Expand Down Expand Up @@ -39,6 +38,7 @@ defmodule GitHooks.MixProject do

def application do
[
mod: {GitHooks.Application, []},
extra_applications: [:logger]
]
end
Expand Down

0 comments on commit 6f683b3

Please sign in to comment.