From 54794fd9a01668870e48a5a58b380bec4d6a9d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 23 May 2015 18:47:21 +0300 Subject: Don't patch plugin at all if not required Remove riak_test from the index as it broke and the problem is larger than it looks. --- core/deps.mk | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'core/deps.mk') diff --git a/core/deps.mk b/core/deps.mk index 66936c1..bfd211c 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -367,10 +367,13 @@ define dep_autopatch_rebar.erl Write("\ninclude ../../erlang.mk"), PatchPlugin = fun(ErlFile) -> {ok, F0} = file:read_file(ErlFile), - F = re:replace(F0, "rebar_config:", "rebar_config_", [global]), - ok = file:write_file(ErlFile, [F, - "\nrebar_config_get(_, current_command, _) -> compile.\n" - ]) + case re:replace(F0, "rebar_config:", "rebar_config_", [global]) of + F0 -> ok; + F -> + ok = file:write_file(ErlFile, [F, + "\nrebar_config_get(_, current_command, _) -> compile.\n" + ]) + end end, RunPlugin = fun(Plugin, Step) -> case erlang:function_exported(Plugin, Step, 2) of -- cgit v1.2.3