Skip to content

Conversation

@Matthijsy
Copy link

When specifying --compress-method without --compress the first argument is ignored. This PR adds a quick check to see that you always specify --compress when you specify a method. There is no need to specify a method when the compression is not happing.

twiggler
twiggler previously approved these changes Dec 4, 2025
Copy link
Contributor

@twiggler twiggler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here correctly catches the edge case where a user supplies a method but forgets the boolean flag.

However, from a UX perspective, if the user explicitly supplies --compress-method, their intent is clearly to compress. Instead of raising a ValueError, would it be cleaner to simply infer args.compress = True if a method is present?

(I approved the pr in case you don't want to pursue this any further)

@twiggler twiggler force-pushed the feature/compress-method-without-compress branch from 49f1735 to 9dd1621 Compare December 4, 2025 15:36
@Matthijsy Matthijsy changed the title Ensure --compress is set when specifying --compress-method Implicit set --compress when specifying --compress-method Dec 5, 2025
@Matthijsy
Copy link
Author

Good point, I agree that --compress-method should infer --compress as well. I just added that to the PR

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