summaryrefslogtreecommitdiff
path: root/src/rebar_asn1_compiler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_asn1_compiler.erl')
-rw-r--r--src/rebar_asn1_compiler.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_asn1_compiler.erl b/src/rebar_asn1_compiler.erl
index 612ae86..40129c9 100644
--- a/src/rebar_asn1_compiler.erl
+++ b/src/rebar_asn1_compiler.erl
@@ -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.