refactor : --rm ignored with stdout #3443
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
zstd
CLI has progressively evolved towards a policy ignoring--rm
command when the output isstdout
. The primary drive is to have a behavior consistent withgzip
where--rm
is the default, but--rm
is ignored when output isstdout
. Other policies are certainly possible, but would break from thisgzip
convention.The new policy was inconsistenly enforced, depending on the exact list of commands. For example, it was possible to circumvent it by using
-c --rm
in this order, which would re-establish source removal.--rm
is always disabled when output isstdout
.-v
).assert()
, which controls that--rm
is no longer active withstdout
--rm
is added after-c
)stdout
+--rm
case, which is no longer possible