checks/installation-without-system: modify to install through normal user instead of root
This commit is contained in:
@@ -64,8 +64,24 @@ def upload(
|
||||
*host.ssh_cmd(),
|
||||
"--",
|
||||
*priviledge_escalation,
|
||||
"bash", "-c", "exec \"$@\"", "--",
|
||||
f"rm -r {remote_dest!s} ; mkdir -m {dir_mode:o} -p {str(remote_dest)} && tar -C {str(remote_dest)} -xzf -",
|
||||
"bash",
|
||||
"-c",
|
||||
'exec "$@"',
|
||||
"--",
|
||||
"rm",
|
||||
"-r",
|
||||
str(remote_dest),
|
||||
"mkdir",
|
||||
"-m",
|
||||
f"{dir_mode:o}",
|
||||
"-p",
|
||||
str(remote_dest),
|
||||
"&&",
|
||||
"tar",
|
||||
"-C",
|
||||
str(remote_dest),
|
||||
"-xzf",
|
||||
"-",
|
||||
]
|
||||
else:
|
||||
# For single file, extract to parent directory and ensure correct name
|
||||
@@ -73,8 +89,24 @@ def upload(
|
||||
*host.ssh_cmd(),
|
||||
"--",
|
||||
*priviledge_escalation,
|
||||
"bash", "-c", "exec \"$@\"", "--",
|
||||
f"rm -f {str(remote_dest)} ; mkdir -m {dir_mode:o} -p {str(remote_dest.parent)} && tar -C {str(remote_dest.parent)} -xzf -",
|
||||
"bash",
|
||||
"-c",
|
||||
'exec "$@"',
|
||||
"--",
|
||||
"rm",
|
||||
"-r",
|
||||
str(remote_dest),
|
||||
"mkdir",
|
||||
"-m",
|
||||
f"{dir_mode:o}",
|
||||
"-p",
|
||||
str(remote_dest.parent),
|
||||
"&&",
|
||||
"tar",
|
||||
"-C",
|
||||
str(remote_dest.parent),
|
||||
"-xzf",
|
||||
"-",
|
||||
]
|
||||
|
||||
# TODO accept `input` to be an IO object instead of bytes so that we don't have to read the tarfile into memory.
|
||||
|
||||
Reference in New Issue
Block a user