Enabling archinstall.sys_command() to get a working directory when executing. The sys_command() is working pretty well for this very specific need, but this is an attempt to making it a bit more generic. A more general overhaul of the command should be done at some point.
This commit is contained in:
parent
aceb0f3e98
commit
b672efdf6b
|
|
@ -106,7 +106,11 @@ class sys_command():#Thread):
|
|||
|
||||
user_catalogue = os.path.expanduser('~')
|
||||
self.cwd = f"{user_catalogue}/.cache/archinstall/workers/{kwargs['worker_id']}/"
|
||||
self.exec_dir = f'{self.cwd}/{os.path.basename(self.cmd[0])}_workingdir'
|
||||
|
||||
if (workdir := kwargs.get('workdir', None)):
|
||||
self.exec_dir = workdir
|
||||
else:
|
||||
self.exec_dir = f'{self.cwd}/{os.path.basename(self.cmd[0])}_workingdir'
|
||||
|
||||
if not self.cmd[0][0] == '/':
|
||||
# "which" doesn't work as it's a builtin to bash.
|
||||
|
|
|
|||
Loading…
Reference in New Issue