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

tar only allows for one exclusion #33

Closed
Athanasius opened this issue Jan 12, 2023 · 1 comment
Closed

tar only allows for one exclusion #33

Athanasius opened this issue Jan 12, 2023 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@Athanasius
Copy link

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.

@TheDoctor0 TheDoctor0 self-assigned this Jan 12, 2023
@TheDoctor0 TheDoctor0 added the good first issue Good for newcomers label Jan 12, 2023
@TheDoctor0
Copy link
Owner

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

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

No branches or pull requests

2 participants