|
4 | 4 | from types import TracebackType |
5 | 5 | from typing import ClassVar, Self |
6 | 6 |
|
7 | | -from archinstall.lib.command import SysCommand, SysCommandWorker, locate_binary |
| 7 | +from archinstall.lib.command import SysCommand, SysCommandWorker |
8 | 8 | from archinstall.lib.exceptions import SysCallError |
9 | 9 | from archinstall.lib.output import error |
10 | 10 |
|
@@ -105,17 +105,7 @@ def is_alive(self) -> bool: |
105 | 105 | return self.session.is_alive() |
106 | 106 |
|
107 | 107 | def SysCommand(self, cmd: list[str], *args, **kwargs) -> SysCommand: # type: ignore[no-untyped-def] |
108 | | - if cmd[0][0] != '/' and cmd[0][:2] != './': |
109 | | - # This check is also done in SysCommand & SysCommandWorker. |
110 | | - # However, that check is done for `machinectl` and not for our chroot command. |
111 | | - # So this wrapper for SysCommand will do this additionally. |
112 | | - |
113 | | - cmd[0] = locate_binary(cmd[0]) |
114 | | - |
115 | 108 | return SysCommand(['systemd-run', f'--machine={self.container_name}', '--pty', *cmd], *args, **kwargs) |
116 | 109 |
|
117 | 110 | def SysCommandWorker(self, cmd: list[str], *args, **kwargs) -> SysCommandWorker: # type: ignore[no-untyped-def] |
118 | | - if cmd[0][0] != '/' and cmd[0][:2] != './': |
119 | | - cmd[0] = locate_binary(cmd[0]) |
120 | | - |
121 | 111 | return SysCommandWorker(['systemd-run', f'--machine={self.container_name}', '--pty', *cmd], *args, **kwargs) |
0 commit comments