From 53c1dda67d2de0a25bbdce0b1a4054cfbb468b32 Mon Sep 17 00:00:00 2001 From: Denis P Date: Wed, 9 Dec 2020 14:33:00 +0100 Subject: [PATCH 1/5] bash: update dep version --- entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8fcb6e4..36d5a70 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,7 +8,7 @@ YELLOW='\033[0;33m' BLUE='\033[0;34m' RED='\033[0;31m' -npm i -g markdown-link-check@3.8.3 +npm i -g markdown-link-check@3.8.4 declare -a FIND_CALL declare -a COMMAND_DIRS COMMAND_FILES @@ -73,7 +73,7 @@ handle_files () { echo -e "${RED}ERROR [✖] Can't find the file: ${YELLOW}${FILELIST[index]}${NC}" exit 2 fi - if [ $index == 0 ]; then + if [ "$index" == 0 ]; then COMMAND_FILES+=("-wholename ${FILELIST[index]}") else COMMAND_FILES+=("-o -wholename ${FILELIST[index]}") @@ -125,9 +125,9 @@ check_additional_files () { if [ -n "$FILES" ]; then if [ "$MAX_DEPTH" -ne -1 ]; then - FIND_CALL=('find' '.' '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}') + FIND_CALL=('find' '.' '-type' 'f' '(' "${FILES}" ')' '-not' '-path' './node_modules/*' '-maxdepth' "${MAX_DEPTH}" '-exec' 'markdown-link-check' '{}') else - FIND_CALL=('find' '.' '-type' 'f' '(' ${FILES} ')' '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}') + FIND_CALL=('find' '.' '-type' 'f' '(' "${FILES}" ')' '-not' '-path' './node_modules/*' '-exec' 'markdown-link-check' '{}') fi add_options @@ -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 From e9e3efd8cb547f20daa7509ad2afe54fc101375e Mon Sep 17 00:00:00 2001 From: Denis P Date: Wed, 9 Dec 2020 15:24:28 +0100 Subject: [PATCH 2/5] md: add tests for URLencoded symbols --- md/file1.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/md/file1.md b/md/file1.md index 9c3d61b..5a4c880 100644 --- a/md/file1.md +++ b/md/file1.md @@ -7,7 +7,11 @@ www.google.com [This is a broken link](https://www.exampleexample.cox) [This is another broken link](http://ignored-domain.com) but its ignored using a -configuration file. +configuration file. + +This is to test URLencoding. + + ### Alpha From 5251eff5bff8ae0894aa3a16ff0df71d0db7d62b Mon Sep 17 00:00:00 2001 From: Denis P Date: Wed, 9 Dec 2020 15:26:36 +0100 Subject: [PATCH 3/5] bash: update to the hot new dep version --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 36d5a70..3d123c2 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,7 +8,7 @@ YELLOW='\033[0;33m' BLUE='\033[0;34m' RED='\033[0;31m' -npm i -g markdown-link-check@3.8.4 +npm i -g markdown-link-check@3.8.5 declare -a FIND_CALL declare -a COMMAND_DIRS COMMAND_FILES From 4a8d49c3c04da55d17618fd5f6edb7f9023823f6 Mon Sep 17 00:00:00 2001 From: Denis P Date: Wed, 9 Dec 2020 16:07:28 +0100 Subject: [PATCH 4/5] test: needs a proper link with %20 --- md/file1.md | 1 - 1 file changed, 1 deletion(-) diff --git a/md/file1.md b/md/file1.md index 5a4c880..cceb163 100644 --- a/md/file1.md +++ b/md/file1.md @@ -11,7 +11,6 @@ configuration file. This is to test URLencoding. - ### Alpha From 411c322c2650a4e668f34042a7ad125b45200d2f Mon Sep 17 00:00:00 2001 From: Denis P Date: Wed, 9 Dec 2020 16:25:25 +0100 Subject: [PATCH 5/5] test: new link to test %20 --- md/file1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/md/file1.md b/md/file1.md index cceb163..a8087c8 100644 --- a/md/file1.md +++ b/md/file1.md @@ -11,6 +11,7 @@ configuration file. This is to test URLencoding. + ### Alpha