Skip to content

brotli CLI: accept -bare and -bytealign with -catable, exit 1 when rejected - #268

Open
lenamonj wants to merge 1 commit into
dropbox:masterfrom
lenamonj:cli-bare-catable
Open

lenamonj wants to merge 1 commit into
dropbox:masterfrom
lenamonj:cli-bare-catable

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 7, 2026

Copy link
Copy Markdown

The README's concatenation recipe is brotli -c -bare -catable -w22 file, but the CLI rejected it: the -bare and -bytealign guards test appendable alone, and -catable only implies appendable once SanitizeParams runs, after the guards. The rejection also returned from main, so the process printed "bare streams only supported when catable or appendable!", wrote nothing and exited 0. A shell pipeline collected an empty part and the combined stream decoded to the first input alone.

-bare -catable and -bytealign -catable are now accepted, matching the message and the README, and the rejection exits 1. -bare or -bytealign without either prerequisite is still refused.

Tests: cargo fmt --check, cargo test, cargo test --doc and cargo test --features portable-float pass. On testdata/ukkonooa, -bare -catable, -bare -appendable and -bytealign -catable now emit 85, 82 and 86 bytes; -bare alone exits 1.

…jected

The -bare and -bytealign guards tested appendable alone, but -catable only implies appendable once SanitizeParams runs, so the README's `-bare -catable` recipe was rejected; the rejection returned from main and exited 0 with no output. Accept -catable as the prerequisite it is and exit 1 when the guard fires.
@CLAassistant

CLAassistant commented Sep 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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