Merge pull request #88 from bpkroth/master

Fix find command quoting issues for multiple folders.
This commit is contained in:
Gaurav Nelson 2020-12-11 13:17:51 +10:00 committed by GitHub
commit 72d871b8c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 2 deletions

View File

@ -9,6 +9,15 @@ jobs:
uses: ./
with:
check-modified-files-only: 'yes'
markdown-link-check-folders:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: markdown-link-check
uses: ./
with:
# Add a test to restrict the test to just dir4 and dir5.
folder-path: './md/dir4, ./md/dir5'
shellcheck:
runs-on: [ubuntu-latest]
steps:

View File

@ -182,9 +182,9 @@ if [ "$CHECK_MODIFIED_FILES" = "yes" ]; then
else
if [ "$5" -ne -1 ]; then
FIND_CALL=('find' "${FOLDERS}" '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}')
FIND_CALL=('find' ${FOLDERS} '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}')
else
FIND_CALL=('find' "${FOLDERS}" '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}')
FIND_CALL=('find' ${FOLDERS} '-name' '*'"${FILE_EXTENSION}" '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}')
fi
add_options

6
md/dir4/ok4.md Normal file
View File

@ -0,0 +1,6 @@
# Ok4
## Test
Go to [Ok5](../dir5/ok5.md#test)

6
md/dir5/ok5.md Normal file
View File

@ -0,0 +1,6 @@
# Ok5
## Test
Go to [Ok4](../dir4/ok4.md#test)