ssh/upload: fix shell quoting

This commit is contained in:
Jörg Thalheim
2025-04-04 17:08:46 +02:00
committed by Mic92
parent 3cadd0849a
commit 0f4c897d41

View File

@@ -66,7 +66,7 @@ def upload(
if host.user != "root":
sudo = "sudo -- "
cmd = "rm -rf $0 && mkdir -m $1 -p $0 && tar -C $0 -xzf -"
cmd = 'rm -rf "$0" && mkdir -m "$1" -p "$0" && tar -C "$0" -xzf -'
# TODO accept `input` to be an IO object instead of bytes so that we don't have to read the tarfile into memory.
with tar_path.open("rb") as f: