anchor.diff:        find_riak(Rest)
     end.
   
  +-spec find_riak_logs([path()]) -> {found, [path(),...]} | not_found.
   find_riak_logs(RiakDir) ->
     {ok, RiakLogHomes} = application:get_env(riaknostic, riak_log_homes),
     PossibleLogDirs = lists:map(fun(LogDir) ->
  
positive.code:       {found, LogDirs}
    end.
  
  fetch_riak_stats(Node) -> 
    rpc:call(Node, riak_kv_stat, get_stats, []).
  
  ping_riak() ->
    { ok, [ { NodeSName, _ } | _ ] } = net_adm:names(),
    Node = list_to_atom(NodeSName ++ "@127.0.0.1"),
  
negative.code: -module(riaknostic).
  -export([main/1,
           run/1
          ]).
  
  -type opt() :: {atom(), any()}.
  -type opt_list() :: [opt()].
  
  -type path() :: string().
  
  -type reason() :: any().
  -type error() :: {error(), reason()}.
  
  -spec main(list()) -> none().
  main(Args) ->
    application:start(riaknostic),
    Opts = riaknostic_opts:parse(Args),
    run(Opts).
  
  -spec run(opt_list()) -> none().
  run(Opts) ->
    SearchDirs = proplists:get_value(dirs, Opts, application:get_env(riaknostic, riak_homes)),
    Dir = case find_riak(SearchDirs) of
      {found, RDir} ->
        io:format("Found Riak installation in: ~s~n", [RDir]),
        RDir;
  