Skip to content

Commit 00ed869

Browse files
authored
Fix Codacy Bugs
1 parent d7ca558 commit 00ed869

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.update.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
*)

0 commit comments

Comments
 (0)