Skip to content

Commit 88151b8

Browse files
gvatsal60Copilot
andauthored
Update .update.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 78be61e commit 88151b8

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.update.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,8 @@ update_os_pkg() {
195195
print_err "Error: Update failed."
196196
fi
197197
# Remove orphaned packages if any exist
198-
ORPHANS=$("${PKG_MGR_CMD}" -Qdtq || true)
199-
if [ -n "${ORPHANS}" ]; then
200-
if ! ("${PKG_MGR_CMD}" -Rns "${ORPHANS}"); then
198+
if [ -n "$("${PKG_MGR_CMD}" -Qdtq)" ]; then
199+
if ! ("${PKG_MGR_CMD}" -Rns $("${PKG_MGR_CMD}" -Qdtq)); then
201200
print_err "Error: Failed to remove orphaned packages."
202201
fi
203202
fi

0 commit comments

Comments
 (0)