diff --git a/installJRMC b/installJRMC index 9e44f72..c126e02 100755 --- a/installJRMC +++ b/installJRMC @@ -440,8 +440,8 @@ set_mc_version() { # Determine latest version # Containerized package manager if create_mc_apt_container && - MC_VERSION=$(sudo buildah run "$CNT" -- apt-cache policy "mediacenter${MC_MVERSION_USER:-${MC_VERSION_HARDCODE%%.*}}" | awk '/Candidate:/ {sub(/-.*/, "", $2); print $2}' | sort -V | tail -n1) && - execute sudo buildah rm "$CNT" && + MC_VERSION=$(buildah run "$CNT" -- apt-cache policy "mediacenter${MC_MVERSION_USER:-${MC_VERSION_HARDCODE%%.*}}" | awk '/Candidate:/ {sub(/-.*/, "", $2); print $2}' | sort -V | tail -n1) && + execute buildah rm "$CNT" && [[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then MC_VERSION_SOURCE="containerized package manager" # Fallback to webscrape