File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ update_os_pkg() {
172172 else
173173 " ${PKG_MGR_CMD} " check-update
174174 rc=$?
175- if [ $rc -ne 0 ] && [ $rc -ne 100 ]; then
175+ if [ " ${rc} " -ne 0 ] && [ " ${rc} " -ne 100 ]; then
176176 print_err " Error: Update failed."
177177 fi
178178 fi
@@ -197,12 +197,12 @@ update_os_pkg() {
197197 # Remove orphaned packages if any exist
198198 ORPHANS=$( " ${PKG_MGR_CMD} " -Qdtq)
199199 rc=$?
200- if [ $rc -eq 0 ] && [ -n " ${ORPHANS} " ]; then
200+ if [ " ${rc} " -eq 0 ] && [ -n " ${ORPHANS} " ]; then
201201 if ! (" ${PKG_MGR_CMD} " -Rns " ${ORPHANS} " ); then
202202 print_err " Error: Failed to remove orphaned packages."
203203 fi
204- elif [ $rc -ne 1 ]; then
205- print_err " Error: Failed to detect orphaned packages (exit code $rc )."
204+ elif [ " ${rc} " -ne 1 ]; then
205+ print_err " Error: Failed to detect orphaned packages (exit code ${rc} )."
206206 fi
207207 ;;
208208 * )
You can’t perform that action at this time.
0 commit comments