action-zip icon indicating copy to clipboard operation
action-zip copied to clipboard

Spaces in filenames

Open wes-sleeman opened this issue 3 years ago • 3 comments

I have filenames with literal spaces in them, but there is no way (so far as I can tell from documentation or reading the source) to get the action to handle the space without breaking into a new file. Quoting with both single and double quotes fails as well as escaping with backslashes.

wes-sleeman avatar Jun 02 '21 16:06 wes-sleeman

index.js#L14 is problematic one. The solution i see would be to change it to to comma separation, but that would be a breaking change.

The other one would be to write algorithm that separates multiple files based on said quotes.

Toumash avatar Jun 06 '21 21:06 Toumash

You could do like softprops/action-gh-release@v1 and use newlines if first line is a pipe. I did this thinking it would work, but it tries to create a file path with a newline character in it.

Like:

        with:
          files: |
            file.txt
            image.png

Journeyman1337 avatar Aug 30 '22 05:08 Journeyman1337

Oh yeah, then probably you can just use getMultilineInput from the code mentioned above. See the library code here

const core = require("@actions/core");
core.getMultilineInput('files')

What about using " " for filenames. Would that work?

Toumash avatar Aug 30 '22 07:08 Toumash