#2533: set default dev output path + clean up
This commit is contained in:
@@ -15,7 +15,7 @@ PRODUCTION_MODE_MESSAGE = (
|
||||
" :monkey_face::monkey_face::monkey_face: [/green]\n"
|
||||
)
|
||||
|
||||
DEVELOPMENT_MODE_MESSAGE = (
|
||||
DEVELOPER_MODE_MESSAGE = (
|
||||
"\n[yellow] :construction::construction::construction: "
|
||||
" PrimAITE is running in Development mode "
|
||||
" :construction::construction::construction: [/yellow]\n"
|
||||
@@ -38,7 +38,7 @@ def dev_mode():
|
||||
def show():
|
||||
"""Show if PrimAITE is in development mode or production mode."""
|
||||
# print if dev mode is enabled
|
||||
print(DEVELOPMENT_MODE_MESSAGE if is_dev_mode() else PRODUCTION_MODE_MESSAGE)
|
||||
print(DEVELOPER_MODE_MESSAGE if is_dev_mode() else PRODUCTION_MODE_MESSAGE)
|
||||
print("\nTo see available options, use [medium_turquoise]`primaite dev-mode --help`[/medium_turquoise]\n")
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def enable():
|
||||
# enable dev mode
|
||||
PRIMAITE_CONFIG["developer_mode"]["enabled"] = True
|
||||
update_primaite_application_config()
|
||||
print(DEVELOPMENT_MODE_MESSAGE)
|
||||
print(DEVELOPER_MODE_MESSAGE)
|
||||
|
||||
|
||||
@dev.command()
|
||||
|
||||
@@ -5,11 +5,7 @@ from primaite import PRIMAITE_CONFIG, PRIMAITE_PATHS
|
||||
|
||||
def is_dev_mode() -> bool:
|
||||
"""Returns True if PrimAITE is currently running in developer mode."""
|
||||
return (
|
||||
PRIMAITE_CONFIG["developer_mode"]["enabled"]
|
||||
if (PRIMAITE_CONFIG.get("developer_mode", {}).get("enabled"))
|
||||
else False
|
||||
)
|
||||
return PRIMAITE_CONFIG["developer_mode"]["enabled"]
|
||||
|
||||
|
||||
def update_primaite_application_config() -> None:
|
||||
|
||||
Reference in New Issue
Block a user