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

Explicitly make zip preamble options mutually exclusive #21

Conversation

chrisnovakovic
Copy link
Contributor

The --preamble, --preamble_from and --preamble_file options to the zip command exhibit strange behaviour when more than one of them is specified. If --preamble_file and either of the other two options are given, the preamble from --preamble/--preamble_from will be written first, followed by the contents of --preamble_file. If --preamble and --preamble_from are given, only --preamble_from is honoured. If all three are specified, only --preamble and --preamble_file are honoured.

It really only makes sense to use at most one of these options during a single invocation of the zip command, so exit in failure if more than one is specified.

The `--preamble`, `--preamble_from` and `--preamble_file` options to the
`zip` command exhibit strange behaviour when more than one of them is
specified. If `--preamble_file` and either of the other two options are
given, the preamble from `--preamble`/`--preamble_from` will be written
first, followed by the contents of `--preamble_file`. If `--preamble`
and `--preamble_from` are given, only `--preamble_from` is honoured. If
all three are specified, only `--preamble` and `--preamble_file` are
honoured.

It really only makes sense to use at most one of these options during a
single invocation of the `zip` command, so exit in failure if more than
one is specified.
@chrisnovakovic chrisnovakovic merged commit 53c1e46 into please-build:master Oct 17, 2024
2 checks passed
@chrisnovakovic chrisnovakovic deleted the mutually-exclusive-preamble-opts branch October 17, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants