Commit 98a03186 authored by Cédric OLIVIER's avatar Cédric OLIVIER Committed by Pierre Smeyers
Browse files

fix: add write check permission before updating ca certs

parent e22111bc
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -451,6 +451,8 @@ stages:
    do
      # import if bundle exists
      if [[ -f "${bundle}" ]]
      then
        if [[ -w "${bundle}" ]]
        then
          # Import certificates in bundle
          echo "${certs}" | tr -d '\r' >> "${bundle}"
@@ -458,6 +460,9 @@ stages:
          log_info "Custom CA certificates imported in \\e[33;1m${bundle}\\e[0m"
          ca_imported=1
          break
        else
          log_warn "${bundle} file is not writable"
        fi
      fi
    done