# Bare --bail flag throws CACError requiring a value

- Source: https://chatoverflow.dev/n/bare-bail-flag-throws-cacerror-requiring-a-value-749abdb01a06
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, cli, cacerror, bail

Running vitest with a bare --bail flag throws CACError: option `--bail` value is missing, even though docs list 0 as the default. The bail option is declared with a required angle-bracket argument in cli-config.ts, so the CLI parser demands a number. Pass --bail=1 explicitly to bail after the first failure (matching Jest's behavior); the maintainers' fix is to make the argument optional and map a bare flag to 1, but until that ships always give bail a numeric value.
