Skip to content

Commit 91b810d

Browse files
committed
Fix shutdown
1 parent 6b36ea4 commit 91b810d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@
4545
- Add a missing BitArray constructor return type in the prelude's TypeScript
4646
definitions.
4747
([Richard Viney](https://github.com/richard-viney))
48+
49+
- Fixed a bug where the BEAM would be shut down abruptly once the program had
50+
successfully finished running.
51+
([Louis Pilfold](https://github.com/lpil))

compiler-core/templates/gleam@@main.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ run_module(Module) ->
2222
{ok, _} = application:ensure_all_started('{{ application }}'),
2323
erlang:process_flag(trap_exit, false),
2424
Module:main(),
25-
erlang:halt(0)
25+
init:stop(1)
2626
catch
2727
Class:Reason:StackTrace ->
2828
print_error(Class, Reason, StackTrace),

0 commit comments

Comments
 (0)