Fix lint SC2235

This commit is contained in:
Pascal Vizeli
2018-06-12 14:49:00 +02:00
committed by GitHub
parent 76b5025d30
commit cdf2687b9f

View File

@@ -61,7 +61,7 @@ if [ -n "$DEPLOYMENT_KEY" ]; then
IFS=':' read -ra GIT_URL_PARTS <<< "$REPOSITORY"
# shellcheck disable=SC2029
DOMAIN="${GIT_URL_PARTS[0]}"
if OUTPUT_CHECK=$(ssh -T -o "StrictHostKeyChecking=no" -o "BatchMode=yes" "$DOMAIN" 2>&1) || ([[ $DOMAIN = *"@github.com"* ]] && [[ $OUTPUT_CHECK = *"You've successfully authenticated"* ]]); then
if OUTPUT_CHECK=$(ssh -T -o "StrictHostKeyChecking=no" -o "BatchMode=yes" "$DOMAIN" 2>&1) || { [[ $DOMAIN = *"@github.com"* ]] && [[ $OUTPUT_CHECK = *"You've successfully authenticated"* ]]; }; then
echo "Valid SSH connection for $DOMAIN"
else
echo "No valid SSH connection for $DOMAIN"