Switch to CLI safe apt command.

Address concern in issue #23.
This commit is contained in:
Andrew Walsh 2022-07-23 00:20:46 -07:00 committed by GitHub
parent 4087e6bcf9
commit 7d122843ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
lib.sh
View file

@ -22,7 +22,7 @@ function get_package_name_ver {
IFS=\: read name ver <<< "${1}" IFS=\: read name ver <<< "${1}"
# If version not found in the fully qualified package value. # If version not found in the fully qualified package value.
if test -z "${ver}"; then if test -z "${ver}"; then
ver="$(grep "Version:" <<< "$(apt show ${name})" | awk '{print $2}')" ver="$(grep "Version:" <<< "$(apt-cache show ${name})" | awk '{print $2}')"
fi fi
echo "${name}" "${ver}" echo "${name}" "${ver}"
} }