Browse Source

new up error handling

Namdak Tonpa 10 years ago
parent
commit
5d0be1e502
3 changed files with 4 additions and 4 deletions
  1. 1 1
      include/mad.hrl
  2. BIN
      mad
  3. 3 3
      src/mad_deps.erl

+ 1 - 1
include/mad.hrl

@@ -1 +1 @@
--define(VERSION,"875ddb").
+-define(VERSION,"22fefa").

BIN
mad


+ 3 - 3
src/mad_deps.erl

@@ -7,9 +7,9 @@ pull(Config,F) ->
     {_,Status,Message} = sh:run(io_lib:format("git -C ~p pull",[F])),
     case Status of
          0 -> mad_utils:verbose(Config,Message), false;
-         _ -> case binary:match(Message,[<<"Aborting">>,<<"timed out">>]) of
-                   nomatch -> false;
-                   _ -> io:format("~s",[binary_to_list(Message)]), true end end.
+         _ -> case binary:match(Message,[<<"You are not currently on a branch">>]) of
+                   nomatch -> mad_utils:verbose(Config,Message), true;
+                   _ -> false end end.
 
 up(Config,Params) ->
     List = case Params of