#2447: added mode to primaite cli + printing session to current working directory if in dev mode

This commit is contained in:
Czar Echavez
2024-04-25 13:32:57 +01:00
parent f01c30864d
commit 96b6fb81da
4 changed files with 67 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
import yaml
from primaite import PRIMAITE_PATHS
def is_dev_mode() -> bool:
"""Returns True if PrimAITE is currently running in developer mode."""
if PRIMAITE_PATHS.app_config_file_path.exists():
with open(PRIMAITE_PATHS.app_config_file_path, "r") as file:
primaite_config = yaml.safe_load(file)
return primaite_config["developer_mode"]