Change the if statement for the initial user

This commit is contained in:
james
2023-02-14 12:54:32 -05:00
parent 8a406c5ca0
commit 41d242a1be
2 changed files with 7 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ env:
OPENBB_USE_PROMPT_TOOLKIT: false
OPENBB_FILE_OVERWRITE: true
OPENBB_ENABLE_CHECK_API: false
OPENBB_PREVIOUS_USER: false
OPENBB_PREVIOUS_USER: true
PIP_DEFAULT_TIMEOUT: 100
on:

View File

@@ -210,6 +210,12 @@ def first_time_user() -> bool:
bool
Whether or not the user is a first time user
"""
if (
"OPENBB_PREVIOUS_USE" in os.environ
and os.environ["OPENBB_PREVIOUS_USE"] is True
):
return False
if USER_ENV_FILE.stat().st_size == 0:
set_key("OPENBB_PREVIOUS_USE", "True", True)
return True