Merge pull request #3892 from pi-hole/fix/debug_strip_comments

Fix debugger stripping content it shouldn't
This commit is contained in:
DL6ER 2020-12-02 21:23:26 +01:00 committed by GitHub
commit db231ded91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -977,7 +977,7 @@ make_array_from_file() {
# Otherwise, read the file line by line # Otherwise, read the file line by line
while IFS= read -r line;do while IFS= read -r line;do
# Othwerise, strip out comments and blank lines # Othwerise, strip out comments and blank lines
new_line=$(echo "${line}" | sed -e 's/#.*$//' -e '/^$/d') new_line=$(echo "${line}" | sed -e 's/^\s*#.*$//' -e '/^$/d')
# If the line still has content (a non-zero value) # If the line still has content (a non-zero value)
if [[ -n "${new_line}" ]]; then if [[ -n "${new_line}" ]]; then
# Put it into the array # Put it into the array