Permalink
Browse files

use filelib:is_regular/1 in rebar_config

  • Loading branch information...
1 parent c669179 commit efead31490c5be821d5bb34b7741e0a52c0c8081 @uwiger committed Apr 5, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/rebar_config.erl
View
@@ -138,11 +138,11 @@ consult_file(File) ->
file:script(File, [{'SCRIPT', File}]);
_ ->
Script = File ++ ".script",
- case file:read_file_info(Script) of
- {ok, _} ->
+ case filelib:is_regular(Script) of
+ true ->
?DEBUG("Evaluating config script ~p~n", [Script]),
file:script(Script, [{'SCRIPT', Script}]);
- _ ->
+ false ->
?DEBUG("Consult config file ~p~n", [File]),
file:consult(File)
end

0 comments on commit efead31

Please sign in to comment.