Action fails when `add` or `remove` only contain a space
See original GitHub issueI suppose what I could do here is simply have 2 steps with conditionals, but that would end up with 2 commits which seems less elegant. Might be nice if it checked for empty and then did nothing on empty (except maybe log a warning).
- uses: EndBug/add-and-commit@v7
with:
message: Generate SVG images for PlantUML diagrams
add: ${{ steps.puml-diff.outputs.changed-light }} ${{ steps.puml-diff.outputs.changed-dark }}
remove: ${{ steps.puml-files.outputs.removed-light }} ${{ steps.puml-files.outputs.removed-dark }}
Run EndBug/add-and-commit@v7
with:
message: Generate SVG images for PlantUML diagrams
add: docs/domain-model/.svg/user-light.svg docs/domain-model/.svg/user-dark.svg
remove:
author_name: xenoterracide
author_email: xenoterracide@users.noreply.github.com
cwd: .
pull_strategy: --no-rebase
push: true
Running in /home/runner/work/iw-ppm-backend/iw-ppm-backend
Add input parsed as single string, running 1 git add command.
> Using 'xenoterracide <xenoterracide@users.noreply.github.com>' as author.
> Using "Generate SVG images for PlantUML diagrams" as commit message.
Internal logs
> Staging files...
> Adding files...
Error: Error: fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Removing white space after using the Replace() expression
Firstly - The 'Filter array' action checks the individual words in the name.If a word is blacklisted it is removed. Secondly - The...
Read more >Not allow a blank character / space in a input form [duplicate]
I'd recommend blocking the submission of the form, rather than preventing default action of the space key, which could be inadvertently circumvented by ......
Read more >action: doremovespace failing ... any ideas?
The messages here are essentially saying that something caused your space deletion to fail, and the task is rolling back. There should be...
Read more >How to handle the space in secret value in github settings
I am getting the below error, by using secret token above format. Getting the issue with space between secret value “Token xxxxxxxxxxx”.
Read more >URL from string with spaces in it | Apple Developer Forums
You should escape the spaces. To do that, you can either change the spaces to "%20" or "+". Posted 7 years ago ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, I got it tested last night finally. It seems to work now
On Sat, Apr 3, 2021, 9:00 AM Federico Grandi @.***> wrote:
Hi, thanks for the report! You’re right, you could do separate steps with checks, but it’s really counter-intuitive that an empty string causes the action to fail, also because the default value for
remove
is actually an empty string. The problem comes from the fact that that string technically isn’t empty, but it contains a space character' '
. I’ll solve this by trimming theadd
andremove
strings, so that strings like that will become empty.