Skip to content

Commit bcf1de5

Browse files
committed
fix: Drop unnecessary duplicate variable naming in the required command check logic
Increases readability. Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
1 parent 57190a3 commit bcf1de5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

basic.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ required_commands=(
2424
realpath
2525
)
2626
flag_dependency_check_failed=false
27-
for required_command in "${required_commands[@]}"; do
28-
if ! command -v "${required_command}" >/dev/null; then
27+
for command in "${required_commands[@]}"; do
28+
if ! command -v "${command}" >/dev/null; then
2929
flag_dependency_check_failed=true
3030
printf \
3131
'Error: Unable to locate the "%s" command in the command search PATHs.\n' \
32-
"${required_command}" \
32+
"${command}" \
3333
1>&2
3434
fi
3535
done

0 commit comments

Comments
 (0)