File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2
2
import termios
3
3
import tty
4
4
from contextlib import AbstractContextManager
5
+ from pathlib import Path
5
6
from typing import Any , Callable
6
7
7
8
import emoji
8
9
from colors import *
9
- from jinja2 import Environment , Template , Undefined
10
+ from jinja2 import Environment , Template , Undefined , FileSystemLoader
10
11
from jinja2 .exceptions import TemplateSyntaxError , UndefinedError
11
12
12
13
@@ -117,7 +118,7 @@ def getch() -> None:
117
118
118
119
def post_process (value : Any , context : dict ) -> Any :
119
120
def _evaluate (expr : str ) -> Any :
120
- environment : Environment = Environment ()
121
+ environment : Environment = Environment (loader = FileSystemLoader ( str ( Path ( '.' ). absolute ())) )
121
122
try :
122
123
if expr .startswith ('{{' ) and expr .endswith ('}}' ) and expr .find ('{{' ) == expr .rfind ('{{' ):
123
124
# line is a single expression (only one '{{' token at the beginning, and '}}' at the end)
You can’t perform that action at this time.
0 commit comments