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

Spaces in file names cases upload step to not work. #33

Open
wildone opened this issue Mar 23, 2022 · 1 comment
Open

Spaces in file names cases upload step to not work. #33

wildone opened this issue Mar 23, 2022 · 1 comment

Comments

@wildone
Copy link

wildone commented Mar 23, 2022

Spaces in file names cases upload step to not work.

Config like this

      - name: Release files - Ubuntu
        if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
        uses: meeDamian/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          gzip: false
          files: >
            dist_electron/*.AppImage
            dist_electron/*.snap
            dist_electron/latest*.yml

With files like this


  total 261284
-rwxr-xr-x 1 runner docker 144196185 Mar 22 15:10 Product Name-2022.2.22.AppImage
-rw-r--r-- 1 runner docker       785 Mar 22 15:11 builder-debug.yml
-rw-r--r-- 1 runner docker       388 Mar 22 15:11 latest-linux.yml
drwxr-xr-x 5 runner docker      4096 Mar 22 15:09 linux-unpacked
-rw-r--r-- 1 runner docker 123338752 Mar 22 15:11 template-electron-vuex-vuetify_2022.2.22_amd64.snap

Generate error like this

Upload Assets
  tar: dist_electron/Product: No such file or directory
  tar: error exit delayed from previous errors
@ivan-the-terrible
Copy link

ivan-the-terrible commented Nov 22, 2023

So after investigating this, it seems to be "a feature, not a bug" with SH (/bin/sh).

On the entrypoint.sh script, the files are evaluated within a loop:
for entry in $INPUT_FILES; do

This has the unfortunate outcome of splitting strings via spaces, BUT you can change the way it should split by updating the Internal Field Separator.
So the solution is:

IFS='
' && for entry in $INPUT_FILES; do

Here's a POC @meeDamian

image

I have this PR (#36), but it looks like this action isn't actively maintained...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants