Skip to content

Commit

Permalink
Merge pull request #427 from inaka/ferigis.419.wrong_version
Browse files Browse the repository at this point in the history
[#419] link to correct version
  • Loading branch information
Brujo Benavides authored Feb 9, 2017
2 parents 28afb83 + 54ff966 commit 500b507
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/elvis.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ start() ->
main(Args) ->
%% Load the application to be able to access its information
%% (e.g. --version option)
ok =
case application:load(elvis_shell) of
ok -> ok;
{error, {already_loaded, elvis_shell}} -> ok
end,
ok =
case application:load(elvis) of
ok -> ok;
Expand Down Expand Up @@ -158,14 +163,17 @@ install git-hook

-spec version() -> ok.
version() ->
{ok, AppConfig} = application:get_all_key(elvis),
Vsn = proplists:get_value(vsn, AppConfig),
{ok, ElvisCoreAppConfig} = application:get_all_key(elvis),
{ok, ElvisShellAppConfig} = application:get_all_key(elvis_shell),
ElvisCoreVsn = proplists:get_value(vsn, ElvisCoreAppConfig),
ElvisShellVsn = proplists:get_value(vsn, ElvisShellAppConfig),
Version = " ______ _ \n"
" / __/ / __(_)__\n"
" / _// / |/ / (_-<\n"
"/___/_/|___/_/___/\n"
"Version: ~s\n",
io:format(Version, [Vsn]).
"Version: ~s\n"
"Elvis Core Version: ~s\n",
io:format(Version, [ElvisShellVsn, ElvisCoreVsn]).


rock_one_song(FileName, Config) ->
Expand Down

0 comments on commit 500b507

Please sign in to comment.