Commit 8160409a authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix(shellcheck): simplify test

parent 2d3cdf3d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ variables:
    log_info "jq installed"

    # Download and configure SSMTP if we are sending mails
    if [[ ! -z "$DEFECTDOJO_SMTP_SERVER" ]]; then
    if [[ "$DEFECTDOJO_SMTP_SERVER" ]]; then
      write_ssmtp_conf
    fi

@@ -148,7 +148,7 @@ variables:
    fi
    log_info "dd_product_pk: ${dd_product_pk}"

    if [[ ! -z "$DEFECTDOJO_SMTP_SERVER" ]]; then
    if [[ "$DEFECTDOJO_SMTP_SERVER" ]]; then
      prepare_mail_template
    fi

@@ -437,7 +437,7 @@ variables:
      done
      log_info "$nb_new_vulns new vulnerabilities"

      if [[ ! -z $DEFECTDOJO_SMTP_SERVER && ${nb_new_vulns} -gt 0 ]]; then
      if [[ $DEFECTDOJO_SMTP_SERVER && ${nb_new_vulns} -gt 0 ]]; then
        log_info "set nb in mail template"
        sed -i 's/<<nb>>/'$nb_new_vulns'/' /tmp/mail.txt
        ssmtp "$GITLAB_USER_EMAIL" < /tmp/mail.txt