Ignore empty environment variables
Related to discussion in https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/5796#note_778122152
- Rename
env_value_if_defined
toenv_var_name_if_defined
because the Ruby method is essentially returning the shell representation of the variable (not value) - 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 ofENV[]
Edited by George Koltsov