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

fix(tar): be more clear that we only support create mode #1038

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/tar.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions lib/private/tar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,19 @@ _tar_attrs = {
doc = """A mode indicator from the following list, copied from the tar manpage:

- create: Create a new archive containing the specified items.
- append: Like `create`, but new entries are appended to the archive.
Note that this only works on uncompressed archives stored in regular files.
The -f option is required.
- list: List archive contents to stdout.
- update: Like `append`, but new entries are added only if they have a
modification date newer than the corresponding entry in the archive.
Note that this only works on uncompressed archives stored in
regular files. The -f option is required.
- extract: Extract to disk from the archive. If a file with the same name
appears more than once in the archive, each copy will be extracted,
with later copies overwriting (replacing) earlier copies.
""",

Other modes may be added in the future.""",
# - append: Like `create`, but new entries are appended to the archive.
# Note that this only works on uncompressed archives stored in regular files.
# The -f option is required.
# - list: List archive contents to stdout.
# - update: Like `append`, but new entries are added only if they have a
# modification date newer than the corresponding entry in the archive.
# Note that this only works on uncompressed archives stored in
# regular files. The -f option is required.
# - extract: Extract to disk from the archive. If a file with the same name
# appears more than once in the archive, each copy will be extracted,
# with later copies overwriting (replacing) earlier copies.
values = ["create"], # TODO: support other modes: ["append", "list", "update", "extract"]
default = "create",
),
Expand Down
Loading