fix upload when sudo prompts are needed

This commit is contained in:
Jörg Thalheim
2025-05-02 13:38:29 +02:00
parent b47c25c620
commit 39880f9434
2 changed files with 99 additions and 29 deletions

View File

@@ -80,6 +80,16 @@ exec {bash} -l "${{@}}"
fake_sudo.write_text(
f"""#!{bash}
# skip over every sudo option
for arg in "${{@}}"; do
if [[ "$arg" == "-p" ]]; then
shift
shift
continue
fi
break
done
exec "${{@}}"
"""
)