Skip to content

Commit

Permalink
Merge pull request #381 from chenull/scp_honour_ssh_arg
Browse files Browse the repository at this point in the history
honour BW_SSH_ARGS for scp command
  • Loading branch information
trehn committed Dec 20, 2017
2 parents 9e918c5 + 752d0ba commit 7b99b91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bundlewrap/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,13 @@ def upload(
"scp",
"-o",
"StrictHostKeyChecking=no" if add_host_keys else "StrictHostKeyChecking=yes",
local_path,
"{}:{}".format(hostname, temp_filename),
]
extra_args = environ.get("BW_SSH_ARGS", "").strip()
if extra_args:
scp_command.extend(split(extra_args))
scp_command.append(local_path)
scp_command.append("{}:{}".format(hostname, temp_filename))

scp_process = run_local(scp_command)

if scp_process.return_code != 0:
Expand Down

0 comments on commit 7b99b91

Please sign in to comment.