From 6e4894a3d073bbb1c3ab2b28af392b77fa92f6bf Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Tue, 17 Mar 2026 23:02:12 -0700 Subject: [PATCH] fix(gmail): remove duplicate attachment arg on +send MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The +send subcommand defined its own "attachment" arg in addition to the "attach" arg already provided by common_mail_args. Since parse_attachments reads "attach", the duplicate "attachment" arg was dead — +send --attachment was silently accepted by clap but the value was never read. --- .changeset/fix-send-attachment-arg.md | 10 ++++++++++ skills/gws-gmail-send/SKILL.md | 1 - src/helpers/gmail/mod.rs | 7 ------- 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .changeset/fix-send-attachment-arg.md diff --git a/.changeset/fix-send-attachment-arg.md b/.changeset/fix-send-attachment-arg.md new file mode 100644 index 00000000..0e376ea5 --- /dev/null +++ b/.changeset/fix-send-attachment-arg.md @@ -0,0 +1,10 @@ +--- +"@googleworkspace/cli": patch +--- + +fix(gmail): remove dead `--attachment` arg from `+send` + +The `+send` subcommand defined a duplicate `"attachment"` arg alongside the +`"attach"` arg already provided by `common_mail_args`. Since `parse_attachments` +reads `"attach"`, the `--attachment` flag was silently ignored. Removed the +dead duplicate. diff --git a/skills/gws-gmail-send/SKILL.md b/skills/gws-gmail-send/SKILL.md index 2377201e..aa2d82b9 100644 --- a/skills/gws-gmail-send/SKILL.md +++ b/skills/gws-gmail-send/SKILL.md @@ -30,7 +30,6 @@ gws gmail +send --to --subject --body | `--subject` | ✓ | — | Email subject | | `--body` | ✓ | — | Email body (plain text, or HTML with --html) | | `--from` | — | — | Sender address (for send-as/alias; omit to use account default) | -| `--attachment` | — | — | Attach a file (can be repeated for multiple files) | | `--attach` | — | — | Attach a file (can be specified multiple times) | | `--cc` | — | — | CC email address(es), comma-separated | | `--bcc` | — | — | BCC email address(es), comma-separated | diff --git a/src/helpers/gmail/mod.rs b/src/helpers/gmail/mod.rs index b9ed7c8e..ce3814fe 100644 --- a/src/helpers/gmail/mod.rs +++ b/src/helpers/gmail/mod.rs @@ -922,13 +922,6 @@ impl Helper for GmailHelper { .long("from") .help("Sender address (for send-as/alias; omit to use account default)") .value_name("EMAIL"), - ) - .arg( - Arg::new("attachment") - .long("attachment") - .help("Attach a file (can be repeated for multiple files)") - .action(ArgAction::Append) - .value_name("PATH"), ), ) .after_help(