Skip to content

Commit

Permalink
Fixing wh_util:whistle_version so crossbar's module cb_about returns …
Browse files Browse the repository at this point in the history
…the correct information
  • Loading branch information
goshh committed Mar 15, 2013
1 parent 56339f2 commit 3647ae3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/whistle-1.0.0/src/wh_util.erl
Expand Up @@ -719,10 +719,10 @@ whistle_version() ->

-spec whistle_version(ne_binary() | nonempty_string()) -> ne_binary().
whistle_version(FileName) ->
case file:consult(FileName) of
{'ok', [Version]} ->
case file:read_file(FileName) of
{'ok', Version} ->
wh_cache:store(?WHISTLE_VERSION_CACHE_KEY, Version),
Version;
list_to_binary(string:strip(binary_to_list(Version), right, $\n));
_ ->
Version = <<"not available">>,
wh_cache:store(?WHISTLE_VERSION_CACHE_KEY, Version),
Expand Down

0 comments on commit 3647ae3

Please sign in to comment.