Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/general.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/general.py')
-rw-r--r--archinstall/lib/general.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index f3773755..ee088d4f 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -308,9 +308,16 @@ class SysCommandWorker:
if not self.pid:
try:
+ try:
+ with open(f"{storage['LOG_PATH']}/cmd_history.txt", "a") as cmd_log:
+ cmd_log.write(f"{' '.join(self.cmd)}\n")
+ except PermissionError:
+ pass
+
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