Skip to content

Commit

Permalink
Fixed file extension check bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Jun 9, 2020
1 parent ee0afb2 commit a719754
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FOLDER_PATH="$4"
MAX_DEPTH="$5"
CHECK_MODIFIED_FILES="$6"
BASE_BRANCH="$7"
if [ $8 -eq 0 ]; then
if [ "$8" -eq 0 ]; then
FILE_EXTENSION=".md"
else
FILE_EXTENSION="$8"
Expand Down Expand Up @@ -81,9 +81,9 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then

for i in "${FILE_ARRAY[@]}"
do
if [ ${i: -3} = "${FILE_EXTENSION}" ]; then
if [ "${i##*.}" = "${FILE_EXTENSION}" ]; then
FIND_CALL+=("${i}")
COMMAND="${FIND_CALL[@]}"
COMMAND="${FIND_CALL[*]}"
$COMMAND &>> error.txt || true
unset 'FIND_CALL[${#FIND_CALL[@]}-1]'
fi
Expand Down

0 comments on commit a719754

Please sign in to comment.