Skip to content

Commit

Permalink
fix: disable shellcheck SC2154 part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Sep 23, 2024
1 parent 628dd1f commit 7f8eb51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if command -v paru > /dev/null; then
# shellcheck disable=SC2034
aur_helper="paru"
elif command -v yay > /dev/null; then
# shellcheck disable=SC2034
aur_helper="yay"
fi

Expand Down Expand Up @@ -40,6 +41,7 @@ if [ -z "${no_color}" ]; then
# shellcheck disable=SC2034
pacman_color_opt="always"
else
# shellcheck disable=SC2034
pacman_color_opt="never"
contrib_color_opt+=("--nocolor")
fi
Expand Down
6 changes: 6 additions & 0 deletions src/lib/list_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
info_msg "$(eval_gettext "Looking for updates...\n")"

if [ -z "${no_version}" ]; then
# shellcheck disable=SC2154
packages=$(checkupdates "${contrib_color_opt[@]}")
else
# shellcheck disable=SC2154
packages=$(checkupdates "${contrib_color_opt[@]}" | awk '{print $1}')
fi

if [ -n "${aur_helper}" ]; then
if [ -z "${no_version}" ]; then
# shellcheck disable=SC2154
aur_packages=$("${aur_helper}" --color "${pacman_color_opt}" "${devel_flag[@]}" -Qua)
else
# shellcheck disable=SC2154
aur_packages=$("${aur_helper}" --color "${pacman_color_opt}" "${devel_flag[@]}" -Qua | awk '{print $1}')
fi
fi
Expand Down Expand Up @@ -51,8 +55,10 @@ else
if [ -z "${list_option}" ]; then
ask_msg "$(eval_gettext "Proceed with update? [Y/n]")"

# shellcheck disable=SC2154
case "${answer}" in
"$(eval_gettext "Y")"|"$(eval_gettext "y")"|"")
# shellcheck disable=SC2154
proceed_with_update="y"
echo
;;
Expand Down
1 change: 1 addition & 0 deletions src/lib/pacnew_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if [ -n "${pacnew_files}" ]; then
ask_msg "$(eval_gettext "Would you like to process these files now? [Y/n]")"
fi

# shellcheck disable=SC2154
case "${answer}" in
"$(eval_gettext "Y")"|"$(eval_gettext "y")"|"")
echo
Expand Down

0 comments on commit 7f8eb51

Please sign in to comment.