move overrides earlier in the execution

use existing configs instead of custom

make format

clean up imports
This commit is contained in:
sriniv27 2021-02-08 20:15:10 -05:00
parent c8e09b023f
commit 1df4b74e53
5 changed files with 23 additions and 27 deletions

View file

@ -400,13 +400,14 @@ def run(context, command, text=""):
if "cache_dir" in context and context.cache_dir is not None:
cache_dir = os.path.join("features", "cache", context.cache_dir)
command = command.format(cache_dir=cache_dir)
if "config_path" in context and context.config_path is not None:
if "config_path" in context and context.config_path is not None:
with open(context.config_path, "r") as f:
cfg = yaml.load(f, Loader=FullLoader)
context.jrnl_config = cfg
args = split_args(command)
context.args = args[1:]
def _mock_editor(command):
context.editor_command = command
tmpfile = command[-1]