fix(dashboard): make dialyzer happy

This commit is contained in:
firest 2022-08-09 16:36:46 +08:00
parent 0f8ebbdf0f
commit 463d255c0a
1 changed files with 3 additions and 2 deletions

View File

@ -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,