fixed chmod path backslash and interactive scripts error
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mathieu Broillet 2023-06-23 15:24:01 +02:00
parent 9492a1d087
commit df5b2187cb
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32
2 changed files with 4 additions and 3 deletions

View File

@ -208,7 +208,8 @@ class LXC(LinuxMachine):
:param script_path:
:return:
"""
return self.run_command(command=f"bash {script_path}", use_ssh=use_ssh)
return self.run_command(command=f"export TERM=linux && bash {script_path}", use_ssh=use_ssh)
def run_command(self, command: str, return_status_code: bool = False,
exception_on_exit: bool = False,

View File

@ -260,9 +260,9 @@ class ProxmoxHost(LinuxMachine):
self.run_command(f"pct push {lxc.id} {source} {destination.as_posix()}")
if permission != 755:
lxc.run_command(f"chmod {permission} {destination}", return_status_code=True, use_ssh=use_ssh)
lxc.run_command(f"chmod {permission} {destination.as_posix()}", return_status_code=True, use_ssh=use_ssh)
if owner != "root":
lxc.run_command(f"chown {owner} {destination}", return_status_code=True)
lxc.run_command(f"chown {owner} {destination.as_posix()}", return_status_code=True)
def copy_folder_to_lxc(self, lxc: LXC, source: str or Path, destination: str or Path, permission: int = 755,
owner: str = "root"):