Skip to content

Instantly share code, notes, and snippets.

@sivsushruth
Created February 29, 2016 09:01
Show Gist options
  • Save sivsushruth/d799ed02b250ef5b32da to your computer and use it in GitHub Desktop.
Save sivsushruth/d799ed02b250ef5b32da to your computer and use it in GitHub Desktop.
escript module not available from elixir
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]
Eshell V7.2 (abort with ^G)
1> escript:extract("demo", []).
{ok,[{shebang,default},
{comment,[]},
{emu_args,"-escript main demo_escript"},
{archive,<<80,75,3,4,20,0,0,0,8,0,231,157,92,72,33,101,
158,13,85,12,0,...>>}]}
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]
Interactive Elixir (1.2.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :escript.extract("demo", [])
** (FunctionClauseError) no function clause matching in :escript.extract/2
(stdlib) escript.erl:163: :escript.extract("demo", [])
@sivsushruth
Copy link
Author

Convert "demo" to 'demo'
Erlang expects a char list for file.
Escript.erl

:escript.extract('demo', [])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment