File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -81,24 +81,24 @@ function is_package_installed() {
8181}
8282
8383function is_native_package_installed() {
84- local PKG =" ${1} "
84+ local PACKAGE_NAME =" ${1} "
8585
8686 if [ " ${DISTRO_FAMILY} " = ' Alpine' ]; then
87- if ( call_package_manager info | grep -q " ^ ${PKG} $ " ) ; then
87+ if call_package_manager -e " ${PACKAGE_NAME} " ; then
8888 return 0 # True
8989 else
9090 return 1 # False
9191 fi
9292 elif [ " ${DISTRO_FAMILY} " = ' Arch' ]; then
93- if (pacman -Q | grep -q " ^${PKG } \s" > /dev/null); then
93+ if (pacman -Q | grep -q " ^${PACKAGE_NAME } \s" > /dev/null); then
9494 return 0 # True
9595 else
9696 return 1 # False
9797 fi
9898 elif [ " ${DISTRO_FAMILY} " = ' Android' ] \
9999 || [ " ${DISTRO_FAMILY} " = ' Debian' ] \
100100 || [ " ${DISTRO_FAMILY} " = ' Ubuntu' ]; then
101- if (apt-cache policy " ${PKG } " | grep -q ' ^\s*Installed:\s*[0-9]' ); then
101+ if (apt-cache policy " ${PACKAGE_NAME } " | grep -q ' ^\s*Installed:\s*[0-9]' ); then
102102 return 0 # True
103103 else
104104 return 1 # False
You can’t perform that action at this time.
0 commit comments