diff options
Diffstat (limited to 'lib/compilers/erlang.js')
-rw-r--r-- | lib/compilers/erlang.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compilers/erlang.js b/lib/compilers/erlang.js index aa9ebde3f..31018086c 100644 --- a/lib/compilers/erlang.js +++ b/lib/compilers/erlang.js @@ -39,8 +39,9 @@ export class ErlangCompiler extends BaseCompiler { '-eval', '{ok, Input} = init:get_argument(input),' + '{ok, _, Output} = compile:file(Input, [\'S\', binary, no_line_info, report]),' + - 'Binary = io_lib:format("~p", [Output]),' + - `file:write_file("${outputFilename}", list_to_binary(Binary)),` + + `{ok,Fd} = file:open("${outputFilename}", [write]),` + + 'beam_listing:module(Fd, Output),' + + 'file:close(Fd),' + 'halt().', ]; } |