TheDoctor0/zip-release

tar only allows for one exclusion

Athanasius opened this issue · 1 comments

For the zip archive type entrypoint.sh iterates over $INPUT_EXCLUSIONS to add a -x! argument per 'word'.

But for the tar archive type it's just doing:

tar -zcvf $INPUT_FILENAME --exclude=$INPUT_EXCLUSIONS $INPUT_PATH 

which means that every word after the first in INPUT_EXCLUSIONS instead is treated by tar as an input path, the exact opposite of what is wanted.

And if you use this with directory: '..' as I'm doing then you get errors like:

tar: .editorconfig: Cannot stat: No such file or directory

because tar can't find the cited filenames/globs in order to use them as input files.

So, the same looping as is done for zip needs to be implemented for tar. For now I'm just going to use a manual script: | for my use case.

Hello @Athanasius.
Thank you for pointing out the issue with handling multiple exclusions for tar - I just implemented it.