From 9ee83380e68c9a60b039c1d851cbb23915bc6b88 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 1 Dec 2022 11:29:46 +0000 Subject: [PATCH] fix missig history file in output director --- ldm/invoke/readline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ldm/invoke/readline.py b/ldm/invoke/readline.py index 330f1fb2a4..af7a2f1f9b 100644 --- a/ldm/invoke/readline.py +++ b/ldm/invoke/readline.py @@ -416,7 +416,11 @@ def get_completer(opt:Args, models=[])->Completer: readline.parse_and_bind('set skip-completed-text on') readline.parse_and_bind('set show-all-if-ambiguous on') - histfile = os.path.join(os.path.expanduser(opt.outdir), '.invoke_history') + outdir = os.path.expanduser(opt.outdir) + if os.path.isabs(outdir): + histfile = os.path.join(outdir,'.invoke_history') + else: + histfile = os.path.join(Globals.root, outdir, '.invoke_history') try: readline.read_history_file(histfile) readline.set_history_length(1000)