diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl index f38b621..ae883e7 100644 --- a/src/rebar_port_compiler.erl +++ b/src/rebar_port_compiler.erl @@ -85,7 +85,7 @@ compile(Config, AppFile) -> %% default for this operating system. This enables max flexibility for users. DefaultEnvs = filter_envs(default_env(), []), OverrideEnvs = filter_envs(rebar_config:get_list(Config, port_envs, []), []), - Env = expand_vars_loop(merge_each_var(os_env() ++ DefaultEnvs ++ OverrideEnvs, [])), + Env = expand_vars_loop(merge_each_var(DefaultEnvs ++ OverrideEnvs ++ os_env(), [])), %% One or more files are available for building. Run the pre-compile hook, if %% necessary.