Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

asn1_compiler: only move hrl file if it exists

  • Loading branch information...
commit e0d9ca077369c78275fea09d5448451bfa7362cf 1 parent 3f14c1c
Ali Yakout ayakout authored tuncer committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/rebar_asn1_compiler.erl
8 src/rebar_asn1_compiler.erl
View
@@ -58,8 +58,12 @@ compile_asn1(Source, Target, Config) ->
ok ->
Asn1 = filename:basename(Source, ".asn1"),
HrlFile = filename:join("src", Asn1 ++ ".hrl"),
- ok = rebar_file_utils:mv(HrlFile, "include"),
- ok;
+ case filelib:is_regular(HrlFile) of
+ true ->
+ ok = rebar_file_utils:mv(HrlFile, "include");
+ false ->
+ ok
+ end;
{error, _Reason} ->
?FAIL
end.
Please sign in to comment.
Something went wrong with that request. Please try again.