Skip to content

Commit

Permalink
fix: Drop unnecessary duplicate variable naming in the required comma…
Browse files Browse the repository at this point in the history
…nd check logic

Increases readability.

Signed-off-by: 林博仁(Buo-ren, Lin) <[email protected]>
  • Loading branch information
brlin-tw committed Nov 30, 2023
1 parent 57190a3 commit bcf1de5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ required_commands=(
realpath
)
flag_dependency_check_failed=false
for required_command in "${required_commands[@]}"; do
if ! command -v "${required_command}" >/dev/null; then
for command in "${required_commands[@]}"; do
if ! command -v "${command}" >/dev/null; then
flag_dependency_check_failed=true
printf \
'Error: Unable to locate the "%s" command in the command search PATHs.\n' \
"${required_command}" \
"${command}" \
1>&2
fi
done
Expand Down

0 comments on commit bcf1de5

Please sign in to comment.