forgot the output would be multiline

This commit is contained in:
Joe DeVivo 2013-10-25 07:34:40 -07:00
parent 24ea8358ca
commit 106598af4c

View File

@ -257,13 +257,9 @@ get_backend(AppConfig) ->
%% Why chkconfig? It generates an app.config from cuttlefish
%% without starting riak.
ChkConfigOutput = run_riak(list_to_integer(N), Path, "chkconfig"),
ChkConfigOutput = string:tokens(run_riak(list_to_integer(N), Path, "chkconfig"), "\n"),
ConfigFileOutputLine = lists:last(string:tokens(
ChkConfigOutput,
"\n"
)),
ConfigFileOutputLine = lists:last(ChkConfigOutput),
%% ConfigFileOutputLine looks like this:
%% -config /path/to/app.config -args_file /path/to/vm.args -vm_args /path/to/vm.args
@ -272,8 +268,9 @@ get_backend(AppConfig) ->
case Files of
[] -> %% No file generated by chkconfig. this isn't great
lager:error("Cuttlefish Failure:"),
lager:info("chkconfig: ~s", [ChkConfigOutput]),
lager:error("Cuttlefish Failure."),
lager:info("chkconfig:"),
[ lager:info("~s", [Line]) || Line <- ChkConfigOutput ],
?assert(false);
_ ->
File = hd(Files),