-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
archive
: support dot-slash-prefixed paths for Tar-formats
#19530
Comments
Hey @tgolsson! I am very sorry, I don't follow what kind of prefix you refer to? A file cannot contain
I must be missing something, apologies. |
Let's imagine this directory:
fed into a tar command. I can pass them in two different ways:
Because tar maintains the full path, those You can find more examples here or here |
Gotcha, now it makes sense to me. I wonder if there are any other kind of prefixes that one would find useful to apply? As it seems to be a common requirement and there is awareness about this layout, perhaps we shall differentiate between producing a tar with dot-slash and without? So instead of an arbitrary prefix, have a boolean instead ( |
I went back and forth on it. I do think that just supporting dot-slash is easier and clearer, as any other prefixing can be achieved with |
Right, so perhaps a new field on the archive target? |
Yeah. Something like |
Is your feature request related to a problem? Please describe.
Some tools (e.g. the Deploy Pages GH Action) prefer and/or require paths that are explicitly relative, with a leading
./
on every path. Pants currently generates archives without this prefix. While not overly complex to manually fix it after packaging, it might be useful to allow this as an option.Describe the solution you'd like
The ability to specify a
path_prefix
for tar-like formats.Describe alternatives you've considered
Manually fixing it seems the most consistent. I was not able to get the right results with
relocated_files
.Additional context
The text was updated successfully, but these errors were encountered: