Skip to content

album update -d with --clear-description silently drops the description #41

Closed

Description

@ergofobe

Symptom

AlbumCommand::Update declares --description/-d and --clear-description with no
conflicts_with, so giving both parses happily and albums::update takes the clearing branch:

description: if clear_description { Some(None) } else { description.map(|d| Some(d.to_string())) },

The description the person asked for is discarded without a word, exit 0. This is #32's
contradiction in another command — edit has the guard (#[arg(long, short = 'd', conflicts_with = "clear_description")] on EditArgs::description) and album update does not.

Reproduction

imogen album update Holiday -d "new text" --clear-description

Accepted; the album ends with no description.

Expected

The pair refuses to parse, as it does on edit: conflicts_with = "clear_description" on
AlbumCommand::Update's description, with a case in cli.rs's parse tests asserting both the
refusal and that each flag alone still parses.

Affected repos

Only imogen-cli. Nothing on the wire changes.

Context

Named in #38's Context section and confirmed while fixing it; left out of that PR because it is a
different defect from the album-reference lookup.

Activity

  1. added
    bugSomething isn't working
    triagedHome repo decided, labelled, ready to bundle
    on Sep 16, 2026
  2. ergofobe commented on Sep 16, 2026

    @ergofobe
    OwnerAuthor

    Fixed in 9460959 (#44). AlbumCommand::Update's description now carries conflicts_with = "clear_description", the same attribute EditArgs has had since #32, so the pair is refused by clap before the command runs (exit 2). cli.rs's an_album_description_cannot_be_both_written_and_removed asserts the refusal and that each flag alone still parses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedHome repo decided, labelled, ready to bundle

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions