Skip to content

Commit

Permalink
fix(tar): be more clear that we only support create mode (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored Jan 24, 2025
1 parent b2d88f0 commit c138dd7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
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

0 comments on commit c138dd7

Please sign in to comment.