mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 22:17:17 +02:00
Protect against standing in the wrong folder when running makemessages or compilemessages i18n commands. Resolve #2582
This commit is contained in:
parent
a17fa2a454
commit
a19211f3fd
1 changed files with 5 additions and 0 deletions
|
|
@ -2316,6 +2316,11 @@ def main():
|
|||
if option in ("makemessages", "compilemessages"):
|
||||
# some commands don't require the presence of a game directory to work
|
||||
need_gamedir = False
|
||||
if CURRENT_DIR != EVENNIA_LIB:
|
||||
print("You must stand in the evennia/evennia/ folder (where the 'locale/' "
|
||||
"folder is located) to run this command.")
|
||||
sys.exit()
|
||||
|
||||
if option in ("shell", "check", "makemigrations", "createsuperuser", "shell_plus"):
|
||||
# some django commands requires the database to exist,
|
||||
# or evennia._init to have run before they work right.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue