feat: Don't add empty or already-set variables
This commit is contained in:
parent
645aeb5651
commit
a30a7fa1b3
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,11 @@ while IFS='=' read -r -d '' n v; do
|
|||
if [ "$n" == "PATH" ]; then
|
||||
continue
|
||||
fi
|
||||
# Skip if the variable is already in the environment with the same
|
||||
# value (treating unset and the empty string as identical states)
|
||||
if [ "${!n:-}" == "$v" ]; then
|
||||
continue
|
||||
fi
|
||||
if (("$(wc -l <<<"$v")" > 1)); then
|
||||
delimiter=$(openssl rand -base64 18)
|
||||
if contains "$delimiter" "$v"; then
|
||||
|
|
Loading…
Reference in a new issue