From e848dfdd33d8b76189ce5a839ccec4e6772f7bd7 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 28 Oct 2019 18:06:04 +0100 Subject: Fixed a issue where the cursor some times would move to far into the trace log of a subcommand. Causnig triggers not to occur. A ghost issue in terms of logic --- archinstall.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archinstall.py b/archinstall.py index 9a5781f5..0840581b 100644 --- a/archinstall.py +++ b/archinstall.py @@ -177,10 +177,12 @@ class sys_command(): if 'triggers' in self.opts: for trigger in list(self.opts['triggers']): if trigger.lower() in trace_log[last_trigger_pos:].lower(): + trigger_pos_in_log = trace_log[last_trigger_pos:].lower().find(trigger.lower()) + len(trigger) + if 'debug' in self.opts and self.opts['debug']: print('[N] Writing to subsystem: {}'.format(self.opts['triggers'][trigger].decode('UTF-8'))) - last_trigger_pos = len(trace_log) + last_trigger_pos = trigger_pos_in_log #len(trace_log) os.write(child_fd, self.opts['triggers'][trigger]) del(self.opts['triggers'][trigger]) broke = True -- cgit v1.2.3-70-g09d2