Blame otp-0007-Split-off-webtool-dependency-from-tools.patch

b7c4f0
From: Peter Lemenkov <lemenkov@gmail.com>
b7c4f0
Date: Sat, 8 Nov 2014 22:54:57 +0300
b7c4f0
Subject: [PATCH] Split off webtool dependency from tools
b7c4f0
b7c4f0
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
b7c4f0
b7c4f0
diff --git a/lib/tools/src/cover_web.erl b/lib/tools/src/cover_web.erl
844843
index ae8b3f2..539ca96 100644
b7c4f0
--- a/lib/tools/src/cover_web.erl
b7c4f0
+++ b/lib/tools/src/cover_web.erl
844843
@@ -51,14 +51,25 @@
b7c4f0
 %%%----------------------------------------------------------------------
b7c4f0
 %% Start webtool and webcover from erlang shell
b7c4f0
 start() ->
b7c4f0
-    webtool:start(),
b7c4f0
-    webtool:start_tools([],"app=webcover"),
b7c4f0
+    try
b7c4f0
+        % Disable automatic dependency picking up
b7c4f0
+        erlang:apply(webtool, start, []),
b7c4f0
+        erlang:apply(webtool, start_tools, [[],"app=webcover"])
b7c4f0
+    catch
b7c4f0
+        error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n")
b7c4f0
+    end,
b7c4f0
     ok.
b7c4f0
 
b7c4f0
 %% Stop webtool and webcover from erlang shell
b7c4f0
 stop() ->
b7c4f0
-    webtool:stop_tools([],"app=webcover"),
b7c4f0
-    webtool:stop().
b7c4f0
+    try
b7c4f0
+        % Disable automatic dependency picking up
bfc808
+        erlang:apply(webtool, stop_tools, [[],"app=webcover"]),
bfc808
+        erlang:apply(webtool, stop, [])
b7c4f0
+    catch
b7c4f0
+        error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n")
b7c4f0
+    end,
b7c4f0
+    ok.
b7c4f0
 
b7c4f0
 
b7c4f0