From 7d122843ce9917108227261652c6492f5661e1f3 Mon Sep 17 00:00:00 2001 From: Andrew Walsh Date: Sat, 23 Jul 2022 00:20:46 -0700 Subject: [PATCH] Switch to CLI safe apt command. Address concern in issue #23. --- lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.sh b/lib.sh index 7c88180..4000bbe 100755 --- a/lib.sh +++ b/lib.sh @@ -22,7 +22,7 @@ function get_package_name_ver { IFS=\: read name ver <<< "${1}" # If version not found in the fully qualified package value. 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 echo "${name}" "${ver}" } @@ -35,4 +35,4 @@ function write_manifest { # 0:-1 to remove trailing comma, delimit by newline and sort echo "${2:0:-1}" | tr ',' '\n' | sort > ${3} log "done." -} \ No newline at end of file +}