nodejs/node · error
argument --verbose / -v already set\n
Error message
argument --verbose / -v already set\n
What it means
`-v`/`--verbose` enables verbose output. Unlike some tools, brotli does not increase verbosity with repeats; the parser rejects a second `-v`.
Source
Thrown at deps/brotli/c/tools/brotli.c:406
} else if (c == 's') {
if (squash_set) {
fprintf(stderr, "argument --squash / -s already set\n");
return COMMAND_INVALID;
}
squash_set = BROTLI_TRUE;
params->reject_uncompressible = BROTLI_TRUE;
continue;
} else if (c == 't') {
if (command_set) {
fprintf(stderr, "command already set when parsing -t\n");
return COMMAND_INVALID;
}
command_set = BROTLI_TRUE;
command = COMMAND_TEST_INTEGRITY;
continue;
} else if (c == 'v') {
if (params->verbosity > 0) {
fprintf(stderr, "argument --verbose / -v already set\n");
return COMMAND_INVALID;
}
params->verbosity = 1;
continue;
} else if (c == 'K') {
if (concatenated_set) {
fprintf(stderr, "argument -K / --concatenated already set\n");
return COMMAND_INVALID;
}
concatenated_set = BROTLI_TRUE;
params->allow_concatenated = BROTLI_TRUE;
continue;
} else if (c == 'V') {
/* Don't parse further. */
return COMMAND_VERSION;
} else if (c == 'Z') {
if (quality_set) {
fprintf(stderr, "quality already set\n");View on GitHub (pinned to 1b2de5e052)
Solutions
- Pass `-v` exactly once.
- Remove the duplicate from your alias or stacked flags.
Example fix
// before brotli -vv file # expecting extra verbosity // after brotli -v file # verbose once
Defensive patterns
Strategy: validation
Validate before calling
assert sum(1 for a in argv if a in ('-v','--verbose') or (a.startswith('-') and not a.startswith('--') and 'v' in a)) <= 1 Prevention
- Remember brotli has a single verbose level; one -v is enough.
- Do not stack -v expecting levels.
When it happens
Trigger: Passing `-v` twice: `brotli -v -v file` or coalesced `brotli -vv file`.
Common situations: Users expecting `-vv` to mean 'more verbose' (it does not here); alias + explicit duplicate.
Related errors
- too many options passed
- quality already set
- write to standard output already set
- command already set when parsing -d
- force output overwrite already set\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/a278600c2436de79.
Report an issue: GitHub.