client: lib_gen: ignore comments in env file

This commit is contained in:
2024-07-12 00:23:57 -07:00
parent b9583a70df
commit 7f199f1615

View File

@@ -207,8 +207,11 @@ function lib_gen::__read_env()
# Set, if env file format (docker / bash)
while read _line; do
export "${_line?}" # SC2163
lib_utils::print_debug "$_line"
# Ignore comments, export line
if [[ ! "$_line" =~ ^# ]]; then
export "${_line?}" # SC2163
lib_utils::print_debug "$_line"
fi
done <"$1"
}