fix(gmail): remove duplicate attachment arg on +send (#532)

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.
This commit is contained in:
Malo Bourgon
2026-03-18 08:45:42 -07:00
committed by GitHub
parent 2e909ae905
commit 1e90380de3
3 changed files with 10 additions and 8 deletions
+10
View File
@@ -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.
-1
View File
@@ -30,7 +30,6 @@ gws gmail +send --to <EMAILS> --subject <SUBJECT> --body <TEXT>
| `--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 |
-7
View File
@@ -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(