fix upload when sudo prompts are needed

This commit is contained in:
Jörg Thalheim
2025-05-02 13:38:29 +02:00
parent 3b5c22ebcf
commit f4d34b1326
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 "${{@}}"
"""
)