#2447: added mode to primaite cli + printing session to current working directory if in dev mode
This commit is contained in:
11
src/primaite/utils/primaite_config_utils.py
Normal file
11
src/primaite/utils/primaite_config_utils.py
Normal 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"]
|
||||
Reference in New Issue
Block a user