Skip to content

Commit 461285a

Browse files
committed
Unquote package lists mistakenly quoted by PR awalsh128#177.
The quotes caused the package lists to be treated as one long single package name.
1 parent 2da29a2 commit 461285a

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

install_and_cache_pkgs.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ log "Clean installing ${package_count} packages..."
7474
# Note: sudo doesn't affect redirects, but we want the output in the file anyway
7575
# shellcheck disable=SC2024
7676
# We intentionally redirect output here; the redirect happens as the current user which is fine
77-
sudo DEBIAN_FRONTEND=noninteractive apt-fast --yes install "${packages}" > "${install_log_filepath}"
77+
#
78+
# If packages is quoted, it'll be interpreted as a single long package name
79+
# instead of a list of packages.
80+
# shellcheck disable=SC2086
81+
sudo DEBIAN_FRONTEND=noninteractive apt-fast --yes install ${packages} > "${install_log_filepath}"
7882
log "done"
7983
log "Installation log written to ${install_log_filepath}"
8084

lib.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,15 @@ function get_normalized_package_list {
125125
local architecture
126126
architecture=$(dpkg --print-architecture)
127127
if [[ "${architecture}" == "arm64" ]]; then
128-
"${script_dir}"/apt_query-arm64 normalized-list "${packages}"
128+
# If packages is quoted, it'll be interpreted as a single long package name
129+
# instead of a list of packages.
130+
# shellcheck disable=SC2086
131+
"${script_dir}"/apt_query-arm64 normalized-list ${packages}
129132
else
130-
"${script_dir}"/apt_query-x86 normalized-list "${packages}"
133+
# If packages is quoted, it'll be interpreted as a single long package name
134+
# instead of a list of packages.
135+
# shellcheck disable=SC2086
136+
"${script_dir}"/apt_query-x86 normalized-list ${packages}
131137
fi
132138
}
133139

0 commit comments

Comments
 (0)