From 02cd8d54ec0c85d8d4086577af98826463b5f365 Mon Sep 17 00:00:00 2001 From: Adam Wight Date: Sun, 19 Apr 2026 15:00:22 +0200 Subject: [PATCH] Set release variables as they appear in the release launcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `mix release` creates a bin/ launcher for the application which sets up several environment variables. I've noticed that in some circumstances—currently unclear exactly when this is, maybe only if `runtime.exs` is used?—the Elixir config provider will try to assertively fetch these two variables from the environment. We can set the variables without hurting use cases which don't require them. --- app/src/main/cpp/native-lib.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/cpp/native-lib.cpp b/app/src/main/cpp/native-lib.cpp index d816bb1..943616c 100644 --- a/app/src/main/cpp/native-lib.cpp +++ b/app/src/main/cpp/native-lib.cpp @@ -96,6 +96,9 @@ const char* startErlang(std::string root_dir, std::string log_dir) update_dir = root_dir + "update"; } + setenv("RELEASE_ROOT", (char*)root_dir.c_str(), 0); + setenv("RELEASE_SYS_CONFIG", (char*)config_path.c_str(), 0); + const char *args[] = { "test_main", "-sbwt",