Skip to content

Commit

Permalink
(maint) Add ability for files to check to continue a space
Browse files Browse the repository at this point in the history
This change adds the ability to still run files that include a space in
their filename through language server.

Without this change, any file that contains a space in their name makes
the action fail.
  • Loading branch information
AdmiringWorm committed Oct 18, 2023
1 parent 445dede commit ee88f40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ set -o noglob
FILES="$(git ls-files | ghglob ${INPUT_PATTERNS})"

Check warning on line 39 in entrypoint.sh

View workflow job for this annotation

GitHub Actions / runner / shellcheck

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. [SC2086](https://github.com/koalaman/shellcheck/wiki/SC2086) Raw Output: ./entrypoint.sh:39:32:info:Double quote to prevent globbing and word splitting. [SC2086](https://github.com/koalaman/shellcheck/wiki/SC2086)

Check failure on line 39 in entrypoint.sh

View workflow job for this annotation

GitHub Actions / runner / shellcheck

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: entrypoint.sh:39:-FILES="$(git ls-files | ghglob ${INPUT_PATTERNS})" entrypoint.sh:39:+FILES="$(git ls-files | ghglob "${INPUT_PATTERNS}")"
set +o noglob

# To manage whitespaces in filepath
IFS=$(echo -en "\n\b")

Check warning on line 43 in entrypoint.sh

View workflow job for this annotation

GitHub Actions / runner / shellcheck

[shellcheck] reported by reviewdog 🐶 In POSIX sh, echo flags are undefined. [SC3037](https://github.com/koalaman/shellcheck/wiki/SC3037) Raw Output: ./entrypoint.sh:43:12:warning:In POSIX sh, echo flags are undefined. [SC3037](https://github.com/koalaman/shellcheck/wiki/SC3037)

run_langtool() {
for FILE in ${FILES}; do
echo "Checking ${FILE}..." >&2
Expand Down
7 changes: 7 additions & 0 deletions testdata/text with spaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
It doesn't works on an unix environment.

It maybe helpful in the future if Austin Energy goes combined cycle.

It still possible for Tom to build a similar chart.

You can do that if need.

0 comments on commit ee88f40

Please sign in to comment.