rojopolis / spellcheck-github-actions

Spell check action
MIT License
132 stars 38 forks source link

Paths with spaces in source_files parameter does not work #84

Closed xsaero00 closed 2 years ago

xsaero00 commented 2 years ago

When files with spaces in paths are supplied to source_files parameter the action does not work as expected.

Partial log:

Run rojopolis/spellcheck-github-actions@0.[2](https://ghe.coxautoinc.com/CMS-PE/Knowledge-Base/runs/402496?check_suite_focus=true#step:5:2)2.1
  with:
    source_files: "Managed Services/Security Monitor/README.md" "Terraform/Development Guide/README.md"
    task_name: Markdown
    config_path: assets/config/.spellcheck.yml
/usr/bin/docker run --name jonasbngithubactionspellcheck0221_70[3](https://<hidden>/Knowledge-Base/runs/402496?check_suite_focus=true#step:5:3)22[5](https://<hidden>/Knowledge-Base/runs/402496?check_suite_focus=true#step:5:5) --label c3f2[6](https://<hidden>/Knowledge-Base/runs/402496?check_suite_focus=true#step:5:6)1 --workdir /github/workspace --rm -e INPUT_SOURCE_FILES -e INPUT_TASK_NAME -e INPUT_CONFIG_PATH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/actions-runner/_work/_temp/_github_home":"/github/home" -v "/actions-runner/_work/_temp/_github_workflow":"/github/workflow" -v "/actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/actions-runner/_work/Knowledge-Base/Knowledge-Base":"/github/workspace" jonasbn/github-action-spellcheck:0.22.1

Using pyspelling on configuration outlined in >assets/config/.spellcheck.yml<
Running task >Markdown<
Checking file >"Managed<
Checking file >Services/Security<
Checking file >Monitor/README.md"<
Checking file >"Terraform/Development<
Checking file >Guide/README.md"<
----------------------------------------------------------------
Spelling check passed :)

PS. Escaping spaces with backslash does not help.

jonasbn commented 2 years ago

Thanks @xsaero00 for the issue report, I will have a look

jonasbn commented 2 years ago

I have done some preliminary investigation and the challenge is that the default separator is space. I have an idea for a solution, where based on contents of the $INPUT_SOURCE_FILES, we do conditional splitting, so we can support the existing approach and keep backwards compatibility and secondly support quoted strings for handling paths including spaces.

I hope to be able to address this during this week (Easter holiday).

The issue seem to be in entrypoint.sh. I read up on some resources and simply quoting the parameters is not sufficient.

jonasbn commented 2 years ago

Hi @xsaero00 I believe I have made fix, I expect to push it live when I have done some more testing.

jonasbn commented 2 years ago

Hi @xsaero00

Release 0.23.1 have been uploaded to the GitHub market place and should be available.

I believe this release addresses your issue, I have done some testing of different usage scenarios. If you do experience any issues, do not hesitate to reach out.

Thanks for the bug report

jonasbn commented 2 years ago

Hi @xsaero00

There was a minor mishap with the 0.23.1 release, so a 0.23.2 was released. You should evaluate that particular release - sorry about any inconvenience

xsaero00 commented 1 year ago

Thanks @jonasbn.

I'll be updating to the latest version of the action.