Closed kxepal closed 9 years ago
Thanks! git bisect
says I broke it here 9f0df1b. I'd like to have the escript version print out correctly too, wonder what changed.
Aha. It's because swirl:start()
doesn't return successfully under escript. Digging further after a sunshine break.
=INFO REPORT==== 18-Jul-2015::16:44:00 ===
swirl: version #decf90c-dirty
escript: exception error: no match of right hand side value ok
in function swirl:main/1 (src/swirl.erl, line 230)
Oops I changed the return code of swirl:start()
for a simple ok
. Here's a simpler fix:
%% for escript support
-spec main(any()) -> no_return().
main(_) ->
ok = start(),
{ok, _ } = start_peer(),
timer:sleep(infinity).
The help text isnt useful anyway as there's no terminal support.
Need to note, that badmatch seems happens only for escript.
swirl:start()
in shell fetches version correctly.