diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/relx.erl | 1 | ||||
-rw-r--r-- | src/rlx_cmd_args.erl | 3 | ||||
-rw-r--r-- | src/rlx_config.erl | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/relx.erl b/src/relx.erl index cf0b367..25f3220 100644 --- a/src/relx.erl +++ b/src/relx.erl @@ -210,6 +210,7 @@ opt_spec_list() -> "Provide an app name and a directory to override in the form <appname>:<app directory>"}, {config, $c, "config", {string, ""}, "The path to a config file"}, {overlay_vars, undefined, "overlay_vars", string, "Path to a file of overlay variables"}, + {vm_args, undefined, "vm_args", string, "Path to a file to use for vm.args"}, {sys_config, undefined, "sys_config", string, "Path to a file to use for sys.config"}, {system_libs, undefined, "system_libs", string, "Path to dir of Erlang system libs"}, {version, undefined, "version", undefined, "Print relx version"}, diff --git a/src/rlx_cmd_args.erl b/src/rlx_cmd_args.erl index ac3e718..44fd226 100644 --- a/src/rlx_cmd_args.erl +++ b/src/rlx_cmd_args.erl @@ -240,6 +240,9 @@ create(overlay_vars, Opts)-> create(sys_config, Opts) -> SysConfig = proplists:get_value(sys_config, Opts, undefined), {sys_config, SysConfig}; +create(vm_args, Opts) -> + VmArgs = proplists:get_value(vm_args, Opts, undefined), + {vm_args, VmArgs}; create(system_libs, Opts) -> SystemLibs = proplists:get_value(system_libs, Opts, undefined), {system_libs, SystemLibs}; diff --git a/src/rlx_config.erl b/src/rlx_config.erl index dbfe1c6..07ac2c5 100644 --- a/src/rlx_config.erl +++ b/src/rlx_config.erl @@ -205,7 +205,12 @@ load_terms({release, {RelName, Vsn}, {erts, ErtsVsn}, {ok, rlx_state:add_configured_release(State, Release1)} end; load_terms({vm_args, VmArgs}, {ok, State}) -> - {ok, rlx_state:vm_args(State, filename:absname(VmArgs))}; + case rlx_state:vm_args(State) of + undefined -> + {ok, rlx_state:vm_args(State, filename:absname(VmArgs))}; + _ -> + {ok, State} + end; load_terms({sys_config, SysConfig}, {ok, State}) -> case rlx_state:sys_config(State) of undefined -> |