oven-sh/bun · error · clap::Error

DoesntTakeValue

Error message

DoesntTakeValue

What it means

Sentinel variant of the internal clap-style argument parser's Error enum: a CLI flag that does not accept a value (a boolean/switch flag) was given one on the command line. The parser rejects the malformed invocation with this machine-readable name; callers map it to a usage message.

Solutions

  1. Remove the `=value` / trailing value from the flag
  2. Use the flag's intended form (bare flag, or --flag=value only for value-taking flags)
  3. Check `bun <command> --help` for the flag's signature
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/clap/error.rs:3 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/b04a8210b56f0092. Report an issue: GitHub.

Appendix: source

Thrown at src/clap/error.rs:3

#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
pub enum Error {
    #[error("DoesntTakeValue")]
    DoesntTakeValue,
    #[error("MissingValue")]
    MissingValue,
    #[error("InvalidArgument")]
    InvalidArgument,
    #[error("WriteFailed")]
    WriteFailed,
}

impl Error {
    #[allow(clippy::trivially_copy_pass_by_ref)]
    pub fn name(&self) -> &'static str {
        match self {
            Self::DoesntTakeValue => "DoesntTakeValue",
            Self::MissingValue => "MissingValue",
            Self::InvalidArgument => "InvalidArgument",
            Self::WriteFailed => "WriteFailed",
        }

View on GitHub (pinned to 8c5296ac45)