Skip to content

Ignore empty environment variables

George Koltsov requested to merge balu-ignore-empty-string-env-vars into master

Related to discussion in https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/5796#note_778122152

  1. Rename env_value_if_defined to env_var_name_if_defined because the Ruby method is essentially returning the shell representation of the variable (not value)
  2. Add a function env_var_value_if_defined to return the value of a variable if it is neither nil, nor empty and use it to access env vars instead of ENV[]
Edited by George Koltsov

Merge request reports