mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add work-around for scp issue in tests.
This commit is contained in:
parent
7b49fa783f
commit
414ac12ddd
1 changed files with 14 additions and 1 deletions
|
@ -2,9 +2,22 @@
|
||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
|
# temporary work-around for issues due to new scp filename checking
|
||||||
|
# https://github.com/ansible/ansible/issues/52640
|
||||||
|
if [[ "$(scp -T 2>&1)" == "usage: scp "* ]]; then
|
||||||
|
# scp supports the -T option
|
||||||
|
# work-around required
|
||||||
|
scp_args=("-e" "ansible_scp_extra_args=-T")
|
||||||
|
else
|
||||||
|
# scp does not support the -T option
|
||||||
|
# no work-around required
|
||||||
|
# however we need to put something in the array to keep older versions of bash happy
|
||||||
|
scp_args=("-e" "")
|
||||||
|
fi
|
||||||
|
|
||||||
# sftp
|
# sftp
|
||||||
./posix.sh "$@"
|
./posix.sh "$@"
|
||||||
# scp
|
# scp
|
||||||
ANSIBLE_SCP_IF_SSH=true ./posix.sh "$@"
|
ANSIBLE_SCP_IF_SSH=true ./posix.sh "$@" "${scp_args[@]}"
|
||||||
# piped
|
# piped
|
||||||
ANSIBLE_SSH_TRANSFER_METHOD=piped ./posix.sh "$@"
|
ANSIBLE_SSH_TRANSFER_METHOD=piped ./posix.sh "$@"
|
||||||
|
|
Loading…
Reference in a new issue