Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyinfra/connectors/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,11 @@ def put_file(
logger.error("File upload error: {0}".format(output.stderr))
return False

rm_arguments = arguments.copy()
# _chdir is the only one of the global arguments that could require _sudo to succeed
# and _sudo isn't present in arguments as removed above
rm_arguments.pop("_chdir", False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was me getting interrupted I think 😒


# Delete the temporary file now that we've successfully copied it
command = StringCommand("rm", "-f", temp_file)

Expand Down
Loading