-
Notifications
You must be signed in to change notification settings - Fork 6
lib/host: Avoid using identical source and destination paths in execute_script scp #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib/host: Avoid using identical source and destination paths in execute_script scp #334
Conversation
87dab23 to
9414d56
Compare
9414d56 to
1963450
Compare
lib/host.py
Outdated
| self.scp(script.name, remote_path) | ||
| self.ssh(['chmod', '0755', remote_path]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be moved in try scope in case for some reason a call fails even if unlikely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, have moved them.
…te_script scp Using the same path for both source and destination may cause scp to fail, especially when the source path (e.g. a temp path on macOS) does not exist on the remote system. Thus, resorting to use mktemp on destination. Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
1963450 to
04aa555
Compare
|
@stormi please see if we need more approvals before merging this. |
Using the same path for both source and destination may cause scp to fail, especially when the source path (e.g. a temp path on macOS) does not exist on the remote system. Thus, resorting to use
mktempon destination.