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

Instrumentation: Handle when multiple packages are declared on a single line #112

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Changes from 1 commit
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
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
edmorley marked this conversation as resolved.
Show resolved Hide resolved
fi
done < <(grep --invert-match -e "^#" -e "^\s*$" "${BUILD_DIR}/Aptfile")

Expand Down