forked from rDrama/rDrama
Fix cli.py running in wrong working directory.
Previously, cli.py ran in <repo-root>/files. However, our relative paths assume the working directory is <repo-root>. This resulted in sanitize.render_emoji L153 to improperly return false when checking for the presence of 'files/assets/images/emojis/{emoji}.webp', leading to emojis in notifications sent by cli.py-invoked tasks to not be rendered to HTML.master
parent
26686a65ec
commit
612fd44298
|
@ -2,6 +2,13 @@ from .__main__ import app, db_session, cache
|
|||
from flask import g
|
||||
import files.helpers.cron
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# cli.py runs in <repo-root>/files, whereas our relative paths assume
|
||||
# the WD is <repo-root>. NOTE: Change this if cli.py is ever moved.
|
||||
os.chdir(Path(__file__).parent.parent)
|
||||
|
||||
#from flask_migrate import Migrate
|
||||
#from flask_sqlalchemy import SQLAlchemy
|
||||
#import files.classes
|
||||
|
|
Loading…
Reference in New Issue