Verified Commit 915a4aa3 authored by Michal Nowak's avatar Michal Nowak
Browse files

Prevent failing ssh-keyscan from terminating

If ssh-keyscan is unable to gather SSH public keys from the
$IPV4_ADDRESS server, it terminates with non-zero exit code, and given
that is configured with "set -e", the script is abrupted,
and the subsequent recovery code is not leveraged at all.
parent 036f4553
Pipeline #75473 passed with stage
in 13 seconds
......@@ -70,8 +70,7 @@ do_prepare() {
sleep 1
SSH_KEYS="$(ssh-keyscan -T 1 "${IPV4_ADDRESS}" 2>/dev/null)"
if [ -z "${SSH_KEYS}" ]; then
if [ -z "$(ssh-keyscan -T 1 "${IPV4_ADDRESS}" 2>/dev/null)" ]; then
sleep 1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment