From 2ac055e82753a50759c2ea76c466049b0b385bf4 Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 7 Nov 2025 22:11:30 -0500 Subject: [PATCH] Make buildah rm quiet --- installJRMC | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/installJRMC b/installJRMC index 53fe28e..b571cee 100755 --- a/installJRMC +++ b/installJRMC @@ -441,7 +441,7 @@ set_mc_version() { # Containerized package manager if create_mc_apt_container && 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" && + buildah rm "$CNT" &>/dev/null && [[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then MC_VERSION_SOURCE="containerized package manager" # Fallback to webscrape @@ -770,7 +770,8 @@ acquire_deb() { # Download the deb file using the containerized package manager # shellcheck disable=SC2016 - if ! { + if ! { + # Download to /tmp to silence _apt permission warnings create_mc_apt_container "cd /tmp && apt-get download --allow-unauthenticated mediacenter$MC_MVERSION -qq" && env CNT="$CNT" MC_DEB="$MC_DEB" buildah unshare -- bash -eu -o pipefail -c ' mnt="$(buildah mount "$CNT")" @@ -778,7 +779,7 @@ acquire_deb() { [[ -n "$deb" ]] && cp -f "$deb" "$MC_DEB" buildah umount "$CNT"' && [[ -f $MC_DEB ]] && - execute buildah rm "$CNT"; + buildah rm "$CNT" &>/dev/null; }; then debug "Failed to download DEB using containerized package manager" echo "Using legacy download method"