Commit a3c1c8f5 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

refactor: remove grep from pipe

parent 0fa885dc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@ function eval_secret() {
}

function eval_all_secrets() {
  encoded_vars=$(env | grep -Ev '(^|.*_ENV_)scoped__' | awk -F '=' '/^[a-zA-Z0-9_]*=@(b64|hex|url)@/ {print $1}')
  # exclude scoped variables and their copies passed to container services (`<service_name>_ENV_scoped__xxx`)
  encoded_vars=$(env | awk -F '=' '$1 !~ /(^|_ENV_)scoped__/ && $2 ~ /^@(b64|hex|url)@/ {print $1}')
  for var in $encoded_vars
  do
    eval_secret "$var"