fix(dashboard): make dialyzer happy
This commit is contained in:
parent
0f8ebbdf0f
commit
463d255c0a
|
@ -310,7 +310,7 @@ add_default_user(Username, Password) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
add_bootstrap_user(File) ->
|
add_bootstrap_user(File) ->
|
||||||
case file:open(File, read) of
|
case file:open(File, [read]) of
|
||||||
{ok, Dev} ->
|
{ok, Dev} ->
|
||||||
{ok, MP} = re:compile(<<"(\.+):(\.+)">>),
|
{ok, MP} = re:compile(<<"(\.+):(\.+)">>),
|
||||||
try
|
try
|
||||||
|
@ -330,7 +330,8 @@ load_bootstrap_user(Dev, MP) ->
|
||||||
{ok, Line} ->
|
{ok, Line} ->
|
||||||
case re:run(Line, MP, [global, {capture, all_but_first, binary}]) of
|
case re:run(Line, MP, [global, {capture, all_but_first, binary}]) of
|
||||||
{match, Captured} ->
|
{match, Captured} ->
|
||||||
[add_user(Username, Password, <<>>) || [Username, Password] <- Captured];
|
_ = [add_user(Username, Password, <<>>) || [Username, Password] <- Captured],
|
||||||
|
ok;
|
||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue