Do not reuse temporary file in server.script()
Even if `src` is the same, other parameters
such as `_su_user` may be different. In this
case pyinfra unconditionally tries to run `chmod +x`
on the file and fails, because the file is
already uploaded as a different user.
@@ -172,7 +172,7 @@ def script(src):
)
"""
- temp_file = state.get_temp_filename(src)
+ temp_file = state.get_temp_filename()
yield from files.put(src, temp_file)
yield chmod(temp_file, "+x")
