Skip to content

Commit

Permalink
Set max value as dynamic counter
Browse files Browse the repository at this point in the history
  • Loading branch information
jabou committed Jan 31, 2024
1 parent df68c8a commit 0c310f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function input_to_tags {
environments_to_build=()

for environment in "${environments_array[@]}"; do
if [ ${environment} -le 9 -a ${environment} -ge 0 ]; then
if [ ${environment} -le $((${#environments[@]} - 1)) -a ${environment} -ge 0 ]; then
environments_to_build+=("${environments[${environment}]}")
else
echo "Error: You chose wrong, young Jedi. This is the end of your path..."
Expand Down

0 comments on commit 0c310f8

Please sign in to comment.