Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(assemble): Use read instead of cat #1147

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions distrobox-assemble
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,7 @@
file="${1}"
name=""

IFS='
'
# shellcheck disable=SC2013
for line in $(cat "${file}"); do
while IFS="" read -r line || [ -n "$line" ]; do

Check notice

Code scanning / shellcheck

Prefer putting braces around variable references even when not strictly required. Note

Prefer putting braces around variable references even when not strictly required.
if [ -z "${line}" ]; then
# blank line, skip
continue
Expand Down Expand Up @@ -461,7 +458,7 @@
fi
echo "${key}=${value}" >> "${tmpfile}"
fi
done
done < "${file}"
# # Execute now one last time for the last block
run_distrobox "${name}"
)
Expand Down