mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix compilation result for asn1 files
This commit is contained in:
parent
1106afb2f6
commit
cc247c5510
7
mix.exs
7
mix.exs
@ -51,7 +51,6 @@ defmodule Mix.Tasks.Compile.Asn1 do
|
|||||||
@recursive true
|
@recursive true
|
||||||
@manifest ".compile.asn1"
|
@manifest ".compile.asn1"
|
||||||
|
|
||||||
@spec run(OptionParser.argv) :: :ok | :noop
|
|
||||||
def run(args) do
|
def run(args) do
|
||||||
{opts, _, _} = OptionParser.parse(args, switches: [force: :boolean])
|
{opts, _, _} = OptionParser.parse(args, switches: [force: :boolean])
|
||||||
|
|
||||||
@ -64,8 +63,10 @@ defmodule Mix.Tasks.Compile.Asn1 do
|
|||||||
Erlang.compile(manifest(), mappings, :asn1, :erl, opts[:force], fn
|
Erlang.compile(manifest(), mappings, :asn1, :erl, opts[:force], fn
|
||||||
input, output ->
|
input, output ->
|
||||||
options = options ++ [:noobj, outdir: Erlang.to_erl_file(Path.dirname(output))]
|
options = options ++ [:noobj, outdir: Erlang.to_erl_file(Path.dirname(output))]
|
||||||
:asn1ct.compile(Erlang.to_erl_file(input), options)
|
case :asn1ct.compile(Erlang.to_erl_file(input), options) do
|
||||||
:ok
|
:ok -> {:ok, :done}
|
||||||
|
error -> error
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user