Skip to content

Commit

Permalink
Handle when multiple packages are declared on a single line.
Browse files Browse the repository at this point in the history
  • Loading branch information
colincasey committed Mar 6, 2024
1 parent 00fa95b commit 2106e87
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/report
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ while IFS= read -r line; do
elif [[ $line == *deb ]]; then
custom_packages+=("${line}")
else
packages+=("${line}")
# while this is not documented behavior, the Aptfile format technically
# does allow for multiple packages separated by spaces to be specified
# on a single line due to how the download command is implemented
IFS=' ' read -ra package_names <<< "${line}"
for package_name in "${package_names[@]}"; do
packages+=("${package_name}")
done
fi
done < <(grep --invert-match -e "^#" -e "^\s*$" "${BUILD_DIR}/Aptfile")

Expand Down

0 comments on commit 2106e87

Please sign in to comment.