diff --git a/src/auth.nim b/src/auth.nim index cac9284..c36e41b 100644 --- a/src/auth.nim +++ b/src/auth.nim @@ -187,13 +187,16 @@ proc setRateLimit*(account: GuestAccount; api: Api; remaining, reset: int) = proc initAccountPool*(cfg: Config) = let path = cfg.accountsFile + let is_jsonl = path.endswith(".jsonl") + let path_exists = fileExists(path) + enableLogging = cfg.enableDebug - if !path.endswith(".jsonl"): + if !is_jsonl: log "Accounts file should be formated with JSONL" quit 1 - if !fileExists(path): + if !path_exists: log "Failed to access the accounts file (", path, ")" quit 1