Skip to content

Commit

Permalink
Force -mode(interpret) in templated escripts
Browse files Browse the repository at this point in the history
Starting with OTP-27, the escript files are compiled by default instead
of running in interpreted mode. Unfortunately for Relx, this causes
issues for releases when the application that has been shipped does not
bundle the compiler application, and errors come out of it.

For full compatibility and better usage for releases, force files to be
interpreted at all times, removing a hidden dependency on the compiler
being present.

Fixes #940
  • Loading branch information
ferd committed Aug 26, 2024
1 parent bacc278 commit ba96e6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions priv/templates/install_upgrade_escript
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
%%! -noinput
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
-mode(interpret).

-define(TIMEOUT, 300000).
-define(INFO(Fmt,Args), io:format(Fmt,Args)).
Expand Down
1 change: 1 addition & 0 deletions priv/templates/nodetool
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
%% relx when OTP-23 becomes the earliest support version of OTP.
%%
%% -------------------------------------------------------------------
-mode(interpret).

main(Args) ->
%% Extract the args
Expand Down

0 comments on commit ba96e6d

Please sign in to comment.