Hide sign-out button in import mode

This commit is contained in:
Adrian Kumpf
2021-02-06 21:39:52 +01:00
parent 294bb28034
commit a2129b1457
4 changed files with 21 additions and 11 deletions
+6 -2
View File
@@ -30,8 +30,12 @@ defmodule Util do
case File.ls(path) do
{:ok, [_ | _] = files} ->
IO.puts("[info] Found #{length(files)} file(s) at '#{path}'. Starting in import mode!")
path
if Enum.any?(files, &TeslaMate.Import.valid_file_name?/1) do
IO.puts("[info] Found #{length(files)} file(s) at '#{path}'. Starting in import mode!")
path
else
nil
end
{:ok, []} ->
nil