From 6a0f6b161c69a465529e13f061c83e5609bdfaf3 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 2 Jun 2021 21:31:28 +0200 Subject: Adding more granular debugging --- archinstall/lib/general.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 3b62c891..7aa307a6 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -13,7 +13,7 @@ from typing import Union from .exceptions import * from .output import log - +from .storage import storage def gen_uid(entropy_length=256): return hashlib.sha512(os.urandom(entropy_length)).hexdigest() @@ -265,6 +265,8 @@ class SysCommandWorker: if not self.pid: try: os.execve(self.cmd[0], self.cmd, {**os.environ, **self.environment_vars}) + if storage.arguments.get('debug'): + log(f"Executing: {self.cmd}", level=logging.DEBUG) except FileNotFoundError: log(f"{self.cmd[0]} does not exist.", level=logging.ERROR, fg="red") self.exit_code = 1 -- cgit v1.2.3-70-g09d2 From abcf3ea88a363d0d7055634b28e5b00e1323e6bb Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 2 Jun 2021 23:53:13 +0200 Subject: Wrong variable name --- archinstall/lib/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 7aa307a6..f72311c9 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -265,7 +265,7 @@ class SysCommandWorker: if not self.pid: try: os.execve(self.cmd[0], self.cmd, {**os.environ, **self.environment_vars}) - if storage.arguments.get('debug'): + if storage['arguments'].get('debug'): log(f"Executing: {self.cmd}", level=logging.DEBUG) except FileNotFoundError: log(f"{self.cmd[0]} does not exist.", level=logging.ERROR, fg="red") -- cgit v1.2.3-70-g09d2