Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths with spaces in source_files parameter does not work #84

Closed
xsaero00 opened this issue Mar 16, 2022 · 6 comments · Fixed by #90
Closed

Paths with spaces in source_files parameter does not work #84

xsaero00 opened this issue Mar 16, 2022 · 6 comments · Fixed by #90
Assignees
Labels
bug Something isn't working
Milestone

Comments

@xsaero00
Copy link

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 jonasbn self-assigned this Mar 16, 2022
@jonasbn jonasbn added the bug Something isn't working label Mar 16, 2022
@jonasbn
Copy link
Collaborator

jonasbn commented Mar 16, 2022

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

@jonasbn
Copy link
Collaborator

jonasbn commented Apr 9, 2022

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 jonasbn pinned this issue Apr 25, 2022
@jonasbn jonasbn added this to the 0.23.1 milestone May 3, 2022
jonasbn added a commit that referenced this issue May 3, 2022
This is first shot at a fix of the issue reported
in #84. I believe file paths without space has been
working as a conincidence since the splitting has
not been working at all, but treating the list of
file names as a single string also worked.

Now it should work for both file paths without spaces
and file paths with spaces, which however require
uniform quoting using either ' (single quotes) or
" (double quotes)
@jonasbn
Copy link
Collaborator

jonasbn commented May 4, 2022

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

jonasbn added a commit that referenced this issue May 5, 2022
…uoting (#90)

* This is first shot at a fix of the issue reported
in #86. I believe file paths without space has been
working as a conincidence since the splitting has
not been working at all, but treating the list of
file names as a single string also worked.

Now it should work for both file paths without spaces
and file paths with spaces, which however require
uniform quoting using either ' (single quotes) or
" (double quotes)

* amend!

This is first shot at a fix of the issue reported
in #84. I believe file paths without space has been
working as a conincidence since the splitting has
not been working at all, but treating the list of
file names as a single string also worked.

Now it should work for both file paths without spaces
and file paths with spaces, which however require
uniform quoting using either ' (single quotes) or
" (double quotes)

* Bumped version in examples for the upcoming bug fix release

* Updated the documentation to support the bug fix addressing issue #84

* Minor correction to Dockerfile, was executing as sh, but was using Bash script
@jonasbn
Copy link
Collaborator

jonasbn commented May 5, 2022

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
Copy link
Collaborator

jonasbn commented May 6, 2022

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

@jonasbn jonasbn unpinned this issue May 15, 2022
@xsaero00
Copy link
Author

Thanks @jonasbn.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants