summaryrefslogtreecommitdiff
path: root/src/rebar_utils.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r--src/rebar_utils.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 8f71bab..abe837a 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -337,10 +337,12 @@ get_deprecated_3(Get, Config, OldOpt, NewOpt, Default, When) ->
patch_on_windows(Cmd, Env) ->
case os:type() of
{win32,nt} ->
- "cmd /q /c "
+ Cmd1 = "cmd /q /c "
++ lists:foldl(fun({Key, Value}, Acc) ->
expand_env_variable(Acc, Key, Value)
- end, Cmd, Env);
+ end, Cmd, Env),
+ %% Remove left-over vars
+ re:replace(Cmd1, "\\\$\\w+|\\\${\\w+}", "", [global, {return, list}]);
_ ->
Cmd
end.